@ -55,9 +55,11 @@ class OrganizationMixin():
|
||||
|
||||
id = obj.get_organization().id
|
||||
|
||||
if obj.is_global:
|
||||
if hasattr(obj, 'is_global'):
|
||||
|
||||
id = 0
|
||||
if obj.is_global:
|
||||
|
||||
id = 0
|
||||
|
||||
|
||||
except AttributeError:
|
||||
|
@ -1,6 +1,5 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% block title %}Organizations{% endblock %}
|
||||
{% block content_header_icon %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -18,6 +18,14 @@ class IndexView(OrganizationPermission, generic.ListView):
|
||||
context_object_name = "organization_list"
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
context['content_title'] = 'Organizations'
|
||||
|
||||
return context
|
||||
|
||||
|
||||
def get_queryset(self):
|
||||
|
||||
if self.request.user.is_superuser:
|
||||
@ -75,6 +83,8 @@ class View(OrganizationPermission, generic.UpdateView):
|
||||
context['model_pk'] = self.kwargs['pk']
|
||||
context['model_name'] = self.model._meta.verbose_name.replace(' ', '')
|
||||
|
||||
context['content_title'] = 'Organization - ' + context[self.context_object_name].name
|
||||
|
||||
return context
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<head>
|
||||
{% load static %}
|
||||
<title>{{ content_title }} - {% settings_value "SITE_TITLE" %}</title>
|
||||
<title>{{ content_title | default_if_none:"" }} - {% settings_value "SITE_TITLE" %}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
Reference in New Issue
Block a user