diff --git a/areas/__pycache__/__init__.cpython-38.pyc b/areas/__pycache__/__init__.cpython-38.pyc index 3ff9165..3fed716 100644 Binary files a/areas/__pycache__/__init__.cpython-38.pyc and b/areas/__pycache__/__init__.cpython-38.pyc differ diff --git a/areas/__pycache__/admin.cpython-38.pyc b/areas/__pycache__/admin.cpython-38.pyc index c67ec55..f4e758a 100644 Binary files a/areas/__pycache__/admin.cpython-38.pyc and b/areas/__pycache__/admin.cpython-38.pyc differ diff --git a/areas/__pycache__/apps.cpython-38.pyc b/areas/__pycache__/apps.cpython-38.pyc index e7a6b78..9290f60 100644 Binary files a/areas/__pycache__/apps.cpython-38.pyc and b/areas/__pycache__/apps.cpython-38.pyc differ diff --git a/areas/__pycache__/forms.cpython-38.pyc b/areas/__pycache__/forms.cpython-38.pyc index c9f46ac..b1a2c81 100644 Binary files a/areas/__pycache__/forms.cpython-38.pyc and b/areas/__pycache__/forms.cpython-38.pyc differ diff --git a/areas/__pycache__/models.cpython-38.pyc b/areas/__pycache__/models.cpython-38.pyc index 83d08a8..04f8d72 100644 Binary files a/areas/__pycache__/models.cpython-38.pyc and b/areas/__pycache__/models.cpython-38.pyc differ diff --git a/areas/__pycache__/urls.cpython-38.pyc b/areas/__pycache__/urls.cpython-38.pyc index ddff2d1..7683456 100644 Binary files a/areas/__pycache__/urls.cpython-38.pyc and b/areas/__pycache__/urls.cpython-38.pyc differ diff --git a/areas/__pycache__/views.cpython-38.pyc b/areas/__pycache__/views.cpython-38.pyc index aae0ee2..bf32680 100644 Binary files a/areas/__pycache__/views.cpython-38.pyc and b/areas/__pycache__/views.cpython-38.pyc differ diff --git a/areas/views.py b/areas/views.py index 7d40c1b..47a209d 100644 --- a/areas/views.py +++ b/areas/views.py @@ -53,6 +53,13 @@ class AreaDeleteView(LoginRequiredMixin, DeleteView): success_url = '/areas' template_name = 'areas/area_confirm_delete.html' + def delete(self, request, *args, **kwargs): + area = Areas.objects.get(pk=kwargs['pk']) + response = super(AreaDeleteView, self).delete(request, *args, **kwargs) + name = area.name + messages.success(request, f'Bereich ' +name+ ' wurde gelöscht!') + return response + def get_context_data(self, **kwargs): context = super(AreaDeleteView, self).get_context_data(**kwargs) context['active_link'] = 'areasmanagement' diff --git a/digitaleagentur/__pycache__/__init__.cpython-38.pyc b/digitaleagentur/__pycache__/__init__.cpython-38.pyc index f932871..1ffa496 100644 Binary files a/digitaleagentur/__pycache__/__init__.cpython-38.pyc and b/digitaleagentur/__pycache__/__init__.cpython-38.pyc differ diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 274771a..301ecfc 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/digitaleagentur/__pycache__/urls.cpython-38.pyc b/digitaleagentur/__pycache__/urls.cpython-38.pyc index c4e18bc..654405b 100644 Binary files a/digitaleagentur/__pycache__/urls.cpython-38.pyc and b/digitaleagentur/__pycache__/urls.cpython-38.pyc differ diff --git a/digitaleagentur/__pycache__/views.cpython-38.pyc b/digitaleagentur/__pycache__/views.cpython-38.pyc index ecd32fe..268c51d 100644 Binary files a/digitaleagentur/__pycache__/views.cpython-38.pyc and b/digitaleagentur/__pycache__/views.cpython-38.pyc differ diff --git a/digitaleagentur/__pycache__/wsgi.cpython-38.pyc b/digitaleagentur/__pycache__/wsgi.cpython-38.pyc index 3e8074e..c66704f 100644 Binary files a/digitaleagentur/__pycache__/wsgi.cpython-38.pyc and b/digitaleagentur/__pycache__/wsgi.cpython-38.pyc differ diff --git a/news/__pycache__/__init__.cpython-38.pyc b/news/__pycache__/__init__.cpython-38.pyc index fe38ad1..50d4891 100644 Binary files a/news/__pycache__/__init__.cpython-38.pyc and b/news/__pycache__/__init__.cpython-38.pyc differ diff --git a/news/__pycache__/admin.cpython-38.pyc b/news/__pycache__/admin.cpython-38.pyc index 144b68c..8692976 100644 Binary files a/news/__pycache__/admin.cpython-38.pyc and b/news/__pycache__/admin.cpython-38.pyc differ diff --git a/news/__pycache__/apps.cpython-38.pyc b/news/__pycache__/apps.cpython-38.pyc index c643216..45a5cfe 100644 Binary files a/news/__pycache__/apps.cpython-38.pyc and b/news/__pycache__/apps.cpython-38.pyc differ diff --git a/news/__pycache__/forms.cpython-38.pyc b/news/__pycache__/forms.cpython-38.pyc index 2903330..4f2a036 100644 Binary files a/news/__pycache__/forms.cpython-38.pyc and b/news/__pycache__/forms.cpython-38.pyc differ diff --git a/news/__pycache__/models.cpython-38.pyc b/news/__pycache__/models.cpython-38.pyc index b32eaa5..bd27abd 100644 Binary files a/news/__pycache__/models.cpython-38.pyc and b/news/__pycache__/models.cpython-38.pyc differ diff --git a/news/__pycache__/urls.cpython-38.pyc b/news/__pycache__/urls.cpython-38.pyc index 329ef64..4f0ef46 100644 Binary files a/news/__pycache__/urls.cpython-38.pyc and b/news/__pycache__/urls.cpython-38.pyc differ diff --git a/news/__pycache__/views.cpython-38.pyc b/news/__pycache__/views.cpython-38.pyc index 069e8d5..f23ea34 100644 Binary files a/news/__pycache__/views.cpython-38.pyc and b/news/__pycache__/views.cpython-38.pyc differ diff --git a/orga/__pycache__/__init__.cpython-38.pyc b/orga/__pycache__/__init__.cpython-38.pyc index 496d807..5fbb46a 100644 Binary files a/orga/__pycache__/__init__.cpython-38.pyc and b/orga/__pycache__/__init__.cpython-38.pyc differ diff --git a/orga/__pycache__/admin.cpython-38.pyc b/orga/__pycache__/admin.cpython-38.pyc index 6513846..52eca0c 100644 Binary files a/orga/__pycache__/admin.cpython-38.pyc and b/orga/__pycache__/admin.cpython-38.pyc differ diff --git a/orga/__pycache__/apps.cpython-38.pyc b/orga/__pycache__/apps.cpython-38.pyc index 52f5b45..bad2d21 100644 Binary files a/orga/__pycache__/apps.cpython-38.pyc and b/orga/__pycache__/apps.cpython-38.pyc differ diff --git a/orga/__pycache__/models.cpython-38.pyc b/orga/__pycache__/models.cpython-38.pyc index 96f69e5..0ceedb8 100644 Binary files a/orga/__pycache__/models.cpython-38.pyc and b/orga/__pycache__/models.cpython-38.pyc differ diff --git a/orga/__pycache__/urls.cpython-38.pyc b/orga/__pycache__/urls.cpython-38.pyc index 442122f..dbd2557 100644 Binary files a/orga/__pycache__/urls.cpython-38.pyc and b/orga/__pycache__/urls.cpython-38.pyc differ diff --git a/orga/__pycache__/views.cpython-38.pyc b/orga/__pycache__/views.cpython-38.pyc index bdc046f..8f8bb8b 100644 Binary files a/orga/__pycache__/views.cpython-38.pyc and b/orga/__pycache__/views.cpython-38.pyc differ diff --git a/standards/__pycache__/__init__.cpython-38.pyc b/standards/__pycache__/__init__.cpython-38.pyc index 3efa48c..10c9914 100644 Binary files a/standards/__pycache__/__init__.cpython-38.pyc and b/standards/__pycache__/__init__.cpython-38.pyc differ diff --git a/standards/__pycache__/admin.cpython-38.pyc b/standards/__pycache__/admin.cpython-38.pyc index a4a2637..636f01b 100644 Binary files a/standards/__pycache__/admin.cpython-38.pyc and b/standards/__pycache__/admin.cpython-38.pyc differ diff --git a/standards/__pycache__/apps.cpython-38.pyc b/standards/__pycache__/apps.cpython-38.pyc index 4552384..4506211 100644 Binary files a/standards/__pycache__/apps.cpython-38.pyc and b/standards/__pycache__/apps.cpython-38.pyc differ diff --git a/standards/__pycache__/forms.cpython-38.pyc b/standards/__pycache__/forms.cpython-38.pyc index 26a019c..a2f4a40 100644 Binary files a/standards/__pycache__/forms.cpython-38.pyc and b/standards/__pycache__/forms.cpython-38.pyc differ diff --git a/standards/__pycache__/models.cpython-38.pyc b/standards/__pycache__/models.cpython-38.pyc index 49f2123..fdd798a 100644 Binary files a/standards/__pycache__/models.cpython-38.pyc and b/standards/__pycache__/models.cpython-38.pyc differ diff --git a/standards/__pycache__/urls.cpython-38.pyc b/standards/__pycache__/urls.cpython-38.pyc index 29e42d3..67f12f1 100644 Binary files a/standards/__pycache__/urls.cpython-38.pyc and b/standards/__pycache__/urls.cpython-38.pyc differ diff --git a/standards/__pycache__/views.cpython-38.pyc b/standards/__pycache__/views.cpython-38.pyc index c6ad04a..c208d1a 100644 Binary files a/standards/__pycache__/views.cpython-38.pyc and b/standards/__pycache__/views.cpython-38.pyc differ diff --git a/standards/templates/standards/standards_single.html b/standards/templates/standards/standards_single.html index a4277e4..df66ab3 100644 --- a/standards/templates/standards/standards_single.html +++ b/standards/templates/standards/standards_single.html @@ -12,6 +12,7 @@

{{standard.name}}

Erstellt durch {{standard.created_standard_by.first_name}} {{standard.created_standard_by.last_name}} am {{standard.created_standard_date}} | Zuletzt bearbeitet von {{ standard.last_modified_by.first_name}} {{ standard.last_modified_by.last_name}} am {{ standard.last_modified_on}} {% if standard.created_standard_by == user or perms.users.standard_management %} +  | Löschen  | Bearbeiten {% endif%} diff --git a/standards/views.py b/standards/views.py index f80eb5c..a228398 100644 --- a/standards/views.py +++ b/standards/views.py @@ -130,6 +130,13 @@ class StandardDeleteView(LoginRequiredMixin, DeleteView): success_url = '/standards' template_name = 'standards/standard_confirm_delete.html' + def delete(self, request, *args, **kwargs): + standard = Standards.objects.get(pk=kwargs['pk']) + response = super(StandardDeleteView, self).delete(request, *args, **kwargs) + names = standard.name + messages.success(request, f'Standard ' +names+ ' wurde gelöscht!') + return response + def get_context_data(self, **kwargs): context = super(StandardDeleteView, self).get_context_data(**kwargs) context['active_link'] = 'standards' diff --git a/tasks/__pycache__/__init__.cpython-38.pyc b/tasks/__pycache__/__init__.cpython-38.pyc index 5761d3d..ba2b443 100644 Binary files a/tasks/__pycache__/__init__.cpython-38.pyc and b/tasks/__pycache__/__init__.cpython-38.pyc differ diff --git a/tasks/__pycache__/admin.cpython-38.pyc b/tasks/__pycache__/admin.cpython-38.pyc index 64cf5df..4785bcc 100644 Binary files a/tasks/__pycache__/admin.cpython-38.pyc and b/tasks/__pycache__/admin.cpython-38.pyc differ diff --git a/tasks/__pycache__/apps.cpython-38.pyc b/tasks/__pycache__/apps.cpython-38.pyc index 1b8289c..acb7215 100644 Binary files a/tasks/__pycache__/apps.cpython-38.pyc and b/tasks/__pycache__/apps.cpython-38.pyc differ diff --git a/tasks/__pycache__/forms.cpython-38.pyc b/tasks/__pycache__/forms.cpython-38.pyc index bfae0d8..7d05cbf 100644 Binary files a/tasks/__pycache__/forms.cpython-38.pyc and b/tasks/__pycache__/forms.cpython-38.pyc differ diff --git a/tasks/__pycache__/models.cpython-38.pyc b/tasks/__pycache__/models.cpython-38.pyc index 45cdb3b..d012e57 100644 Binary files a/tasks/__pycache__/models.cpython-38.pyc and b/tasks/__pycache__/models.cpython-38.pyc differ diff --git a/tasks/__pycache__/urls.cpython-38.pyc b/tasks/__pycache__/urls.cpython-38.pyc index fbe82ce..065fae8 100644 Binary files a/tasks/__pycache__/urls.cpython-38.pyc and b/tasks/__pycache__/urls.cpython-38.pyc differ diff --git a/tasks/__pycache__/views.cpython-38.pyc b/tasks/__pycache__/views.cpython-38.pyc index c25b548..8248b69 100644 Binary files a/tasks/__pycache__/views.cpython-38.pyc and b/tasks/__pycache__/views.cpython-38.pyc differ diff --git a/tasks/views.py b/tasks/views.py index 9bea89e..dd7d355 100644 --- a/tasks/views.py +++ b/tasks/views.py @@ -49,6 +49,13 @@ class TasksDeleteView(LoginRequiredMixin, DeleteView): model = Tasks success_url = '/tasks' template_name = 'tasks/tasks_confirm_delete.html' + + def delete(self, request, *args, **kwargs): + area = Tasks.objects.get(pk=kwargs['pk']) + response = super(TasksDeleteView, self).delete(request, *args, **kwargs) + name = area.name + messages.success(request, f'Aufgabe ' +name+ ' wurde gelöscht!') + return response def get_context_data(self, **kwargs): context = super(TasksDeleteView, self).get_context_data(**kwargs) diff --git a/users/__pycache__/__init__.cpython-38.pyc b/users/__pycache__/__init__.cpython-38.pyc index 1988400..09287f9 100644 Binary files a/users/__pycache__/__init__.cpython-38.pyc and b/users/__pycache__/__init__.cpython-38.pyc differ diff --git a/users/__pycache__/admin.cpython-38.pyc b/users/__pycache__/admin.cpython-38.pyc index 407ba3c..131dcf0 100644 Binary files a/users/__pycache__/admin.cpython-38.pyc and b/users/__pycache__/admin.cpython-38.pyc differ diff --git a/users/__pycache__/apps.cpython-38.pyc b/users/__pycache__/apps.cpython-38.pyc index cea3da8..e12f316 100644 Binary files a/users/__pycache__/apps.cpython-38.pyc and b/users/__pycache__/apps.cpython-38.pyc differ diff --git a/users/__pycache__/models.cpython-38.pyc b/users/__pycache__/models.cpython-38.pyc index 6a63d41..0ec8d15 100644 Binary files a/users/__pycache__/models.cpython-38.pyc and b/users/__pycache__/models.cpython-38.pyc differ diff --git a/users/__pycache__/priomodel.cpython-38.pyc b/users/__pycache__/priomodel.cpython-38.pyc index f822ee2..e0c5566 100644 Binary files a/users/__pycache__/priomodel.cpython-38.pyc and b/users/__pycache__/priomodel.cpython-38.pyc differ diff --git a/users/__pycache__/signals.cpython-38.pyc b/users/__pycache__/signals.cpython-38.pyc index a854aad..8eaf08a 100644 Binary files a/users/__pycache__/signals.cpython-38.pyc and b/users/__pycache__/signals.cpython-38.pyc differ diff --git a/users/__pycache__/urls.cpython-38.pyc b/users/__pycache__/urls.cpython-38.pyc index 353d16f..0daf14b 100644 Binary files a/users/__pycache__/urls.cpython-38.pyc and b/users/__pycache__/urls.cpython-38.pyc differ diff --git a/users/__pycache__/usersforms.cpython-38.pyc b/users/__pycache__/usersforms.cpython-38.pyc index c7eb2db..9f87820 100644 Binary files a/users/__pycache__/usersforms.cpython-38.pyc and b/users/__pycache__/usersforms.cpython-38.pyc differ diff --git a/users/__pycache__/views.cpython-38.pyc b/users/__pycache__/views.cpython-38.pyc index 74b5370..bbe1500 100644 Binary files a/users/__pycache__/views.cpython-38.pyc and b/users/__pycache__/views.cpython-38.pyc differ diff --git a/users/signals.py b/users/signals.py index ce9c1ae..4e26c1e 100644 --- a/users/signals.py +++ b/users/signals.py @@ -1,9 +1,10 @@ -from django.db.models.signals import post_save +from django.db.models.signals import post_save, pre_delete from django.contrib.auth.models import User from django.dispatch import receiver from .models import Profile, Agency from django.contrib.auth.models import Permission + @receiver(post_save, sender=User) def create_profile(sender, instance, created, **kwargs): if created: @@ -25,4 +26,4 @@ def create_profile(sender, instance, created, **kwargs): @receiver(post_save, sender=User) def save_profile(sender, instance, **kwargs): - instance.profile.save() \ No newline at end of file + instance.profile.save() diff --git a/users/templates/users/newusers_email.html b/users/templates/users/newusers_email.html index e69de29..a9adf00 100644 --- a/users/templates/users/newusers_email.html +++ b/users/templates/users/newusers_email.html @@ -0,0 +1,29 @@ +{% load i18n %}{% autoescape off %} + + + + + + +

Digitale Agentur | Account

+
+

+ Hallo {{username}},

+ für Sie wurde ein Account in der Agentur {{user.profile.agency.name}} erstellt. Bitte gehen Sie auf folgenden Link, um ein Passwort zu erstellen: +

+ https://digitale-agentur.com/password-reset +

+ Weitere Informationen erhalten Sie von Ihrem Agenturleiter. +

+

+ Vielen Dank, dass Sie die Plattform Digitale Agentur nutzen! +

+ Mit freundlichen Grüßen +

+ Ihr Team von Digitale Agentur +

+ + +{% endautoescape %} diff --git a/users/templates/users/password_reset_mail.html b/users/templates/users/password_reset_mail.html index 23d8f07..5f23357 100644 --- a/users/templates/users/password_reset_mail.html +++ b/users/templates/users/password_reset_mail.html @@ -1,26 +1,32 @@ {% load i18n %}{% autoescape off %} + + -

Digitale Agentur Passwort

+

Digitale Agentur | Passwort vergessen

+

- Hallo {{user.first_name}} {{user.last_name}},
- Sie haben eine neues Passwort für den Zugang ihrer Agentur {{user.profile.agency.name}} angefordert. Bitte gehen Sie auf folgenden Link, um sich ein Passwort zu setzen: + Hallo {{user.first_name}} {{user.last_name}},

+ Sie haben eine neues Passwort für den Zugang ihrer Agentur {{user.profile.agency.name}} angefordert. Bitte gehen Sie auf folgenden Link, um ein Passwort zu erstellen: +

{% block reset_link %} - {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +

{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}

{% endblock %} - Ihr Benutzername: {{ user.get_username }} -
+

Ihr Benutzername: {{ user.get_username }}

+

Sollten Sie kein Passwort angefordert haben, ignorieren Sie diese E-Mail.

- Vielen Dank, dass Sie die Plattform Digitale Agentur nutzen! -
+ Vielen Dank, dass Sie die Plattform Digitale Agentur nutzen! +

Mit freundlichen Grüßen

Ihr Team von Digitale Agentur

-{% endautoescape %} \ No newline at end of file +{% endautoescape %} diff --git a/users/templates/users/register_mail.html b/users/templates/users/register_mail.html index 638b62a..8014fe3 100644 --- a/users/templates/users/register_mail.html +++ b/users/templates/users/register_mail.html @@ -1,16 +1,23 @@ {% load i18n %}{% autoescape off %} + +

Digitale Agentur Registrierung

Hallo {{username}},
- Ihre Agentur wurde erstellt. Sie können sich nun hier anmelden und ihre Agentur gestalten. -

+ Ihre Agentur wurde erstellt. Sie können sich nun hier anmelden und ihre Agentur gestalten: +

+ https://digitale-agentur.com +

+
Ihr Benutzername: {{ username_log }}
- Sollten Sie kein Passwort angefordert haben, ignorieren Sie diese E-Mail. + Weitere Informationen erhalten Sie in unserem Wiki https://wiki.digitale-agentur.com/ oder per E-Mail an support@digitale-agentur.com!

Vielen Dank, dass Sie die Plattform Digitale Agentur nutzen! diff --git a/users/views.py b/users/views.py index 74f8ebb..6184fa4 100644 --- a/users/views.py +++ b/users/views.py @@ -69,7 +69,7 @@ def dashboard(request): # Loading only user same agency # Change context and return for template-data # # Get all Users of the Same Agency as logged user - standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).order_by('-created_standard_date')[:10] + standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).order_by('-created_standard_date')[:10] filterdate = datetime.now() news = News.objects.filter(agency__pk=request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate) @@ -114,16 +114,20 @@ class UsersCreateUser(LoginRequiredMixin, CreateView): messages.success(self.request, f'Benutzer angelegt!') # SAVE OBJECTS TO SIGNALE! form.instance.agency = self.request.user.profile.agency - + newuser_name = form.cleaned_data.get('first_name') + " " + form.cleaned_data.get('last_name') + msg_html = render_to_string('users/newusers_email.html', {'username': newuser_name}) # E-Mail für Passwort-Setzung! send_mail( - self.request.user.profile.agency.name + ' Anmeldung', + self.request.user.profile.agency.name + ' Account', 'Hallo ' + form.cleaned_data.get('first_name') + ' ' + form.cleaned_data.get('last_name') + '! Bitte setzen sie sich auf https://digitale-agentur.com/password-reset/ ein Passwort.', 'support@digitale-agentur.com', [form.cleaned_data.get('email')], + html_message=msg_html, fail_silently=False, ) + + return super().form_valid(form) # USER muss eingeloggt sein, um diese Seite zu sehen @@ -212,27 +216,61 @@ class ProfileUpdateView(LoginRequiredMixin, UpdateView): context['active_link'] = 'usersmanagement' return context -# Delete a user! +''' + + # DELETE A USER + + Hier wird das Profil gelöscht, aber damit auch der User. Zusätzlich werden + alle Standards, Bereiche und Tasks des zu löschenden Nutzers dem User + zugeschrieben, welcher eingeloggt ist. Das passiert VOR dem löschen! + +''' class ProfileDeleteView(LoginRequiredMixin, DeleteView): model = User success_url = '/dashboard/usersman' template_name = 'users/user_confirm_delete.html' - def test_func(self): - tempuser = self.get_object() - todel_name = self.get_object().first_name + " " + self.get_object().last_name - # self request user ist der aktuell user - messages.success(self.request, f'Benutzer {todel_name} entfernet!') - if self.request.user == tempuser: - return False - return True + + def delete(self, request, *args, **kwargs): + user = User.objects.get(pk=kwargs['pk']) + logged_user = request.user + areas_fs = Areas.objects.filter(created_area_by=user) + for a in areas_fs: + a.created_area_by = logged_user + a.save() + + # ACHTUNG! Bei Tasks heißt es leider auch created_area... + task_fs = Tasks.objects.filter(created_area_by=user) + for t in task_fs: + t.created_area_by = logged_user + t.save() + + standards_fs = Standards.objects.filter(created_standard_by=user) + print(standards_fs) + for a in standards_fs: + a.created_standard_by = logged_user + a.save() + + standards_fs = Standards.objects.filter(last_modified_by=user) + for a in standards_fs: + a.last_modified_by = logged_user + a.save() + + standards_fs = Standards.objects.filter(published_by=user) + for a in standards_fs: + a.published_by = logged_user + a.save() + + response = super(ProfileDeleteView, self).delete(request, *args, **kwargs) + name = user.first_name + " " + user.last_name + messages.success(request, f'Benutzer ' +name+ ' wurde gelöscht!') + return response @login_required def agency(request): context = { 'active_link' : 'agencyinfo' } - return render(request, 'users/agency.html', context)