diff --git a/dasettings/templates/dasettings/agencynetwork_content.html b/dasettings/templates/dasettings/agencynetwork_content.html
index c758f8e..3cdb819 100644
--- a/dasettings/templates/dasettings/agencynetwork_content.html
+++ b/dasettings/templates/dasettings/agencynetwork_content.html
@@ -40,7 +40,7 @@
{{agn.creator.first_name }} {{agn.creator.last_name }}
{{agn.created_on }}
{{agn.lastactivity}}
- {% if is_adminag %} {% endif %} {% if outstanding %} {% endif %} {{agsum}}{% if is_adminag %} {% endif %}
+ {% if is_adminag %} {% endif %} {% if outstanding %} {% endif %}{{agsum}}{% if is_adminag %} {% endif %}
{{agn.standards.all|length}}
{% if is_adminag %}
diff --git a/dasettings/views.py b/dasettings/views.py
index 4c80b18..d46655c 100644
--- a/dasettings/views.py
+++ b/dasettings/views.py
@@ -685,7 +685,19 @@ def ManageAgInAgn(request, pk):
else:
network = list(agn)[0]
- allagofagn = network.members.all() | network.sharemembers.all() | network.adminagencys.all()
+
+ allagofagn = []
+ for a in network.members.all():
+ allagofagn.append(a)
+
+ for a in network.sharemembers.all():
+ allagofagn.append(a)
+
+ for a in network.adminagencys.all():
+ allagofagn.append(a)
+
+ print(allagofagn)
+
context = {
'active_link' : 'dasettings',
'agn' : list(agn)[0],
@@ -738,7 +750,6 @@ def AgencyNetworkAjaxSettings(request):
AgencyNetworkPreperation.objects.get(pk=request.GET['agn_inv']).delete()
success = True
elif request.method == 'GET' and request.GET['action'] == "changeagrights":
- print("UPDATE")
agency = Agency.objects.get(pk=request.GET['agency'])
agn = AgencyNetwork.objects.get(pk=request.GET['agnid'])
if(agency != None and agn != None):
@@ -751,8 +762,6 @@ def AgencyNetworkAjaxSettings(request):
agn.sharemembers.add(agency)
elif (request.GET['newstatus'] == "2"):
agn.adminagencys.add(agency)
-
-
success = True
else:
success = False
diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc
index 40c547c..1661d7a 100644
Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ
diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py
index eeaede3..0995162 100644
--- a/digitaleagentur/settings.py
+++ b/digitaleagentur/settings.py
@@ -15,8 +15,8 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-#BASE_URL = "https://digitale-agentur.com/"
-BASE_URL = "http://localhost:8000/"
+BASE_URL = "https://digitale-agentur.com/"
+#BASE_URL = "http://localhost:8000/"
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
# FOR SUMMERNOTE ORIGIN
@@ -174,20 +174,13 @@ GRAPPELLI_CLEAN_INPUT_TYPES = False
# EMAILs
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
-'''
+
EMAIL_HOST = 'smtp.strato.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "support@digitale-agentur.com"
EMAIL_HOST_PASSWORD = "aPx9m3!7x3m@8o!t"
DEFAULT_FROM_EMAIL = "support@digitale-agentur.com"
-'''
-EMAIL_HOST = 'gymhum.de'
-EMAIL_PORT = 587
-EMAIL_USE_TLS = True
-EMAIL_HOST_USER = "holger.trampe@gymhum.de"
-EMAIL_HOST_PASSWORD = "Motte2016_!"
-DEFAULT_FROM_EMAIL = "holger.trampe@gymhum.de"
# FOR DATEPICKER
diff --git a/standards/models.py b/standards/models.py
index e4938bb..4e5d840 100644
--- a/standards/models.py
+++ b/standards/models.py
@@ -8,12 +8,12 @@ from cloud.models import DataFile
from users.models import AgencyGroup
import datetime
from django.utils import timezone
-#from ckeditor_uploader.fields import RichTextUploadingField
+
class StandardCommentRate(models.Model):
- standard = models.ForeignKey("Standards", on_delete=models.CASCADE)
+ #standard = models.ForeignKey("Standards", on_delete=models.CASCADE)
rated_by = models.ForeignKey(User, on_delete=models.PROTECT)
rate_stats = models.IntegerField(default=0)
- oncomment = models.ForeignKey("StandardComments", on_delete=models.PROTECT)
+ oncomment = models.ForeignKey("StandardComments", on_delete=models.CASCADE)
class StandardComments(models.Model):
standard = models.ForeignKey("Standards", on_delete=models.CASCADE)
diff --git a/standards/templates/standards/standards_single_agn.html b/standards/templates/standards/standards_single_agn.html
index 56ce8d4..6d94a33 100644
--- a/standards/templates/standards/standards_single_agn.html
+++ b/standards/templates/standards/standards_single_agn.html
@@ -4,9 +4,13 @@
{{standard.name}}
{% checkifsharedstandardinagency request.user.profile.agency standard as isshared %}
- {% if isshared == False %}
+ {% if isshared == False and standard.agency != request.user.profile.agency %}
-
+ Standard in meine Agentur übernehmen
+
+ {% elif standard.agency == request.user.profile.agency %}
+
+ Standard ist aus ihrer Agentur
{% else %}
@@ -67,7 +71,7 @@
- Erstellt in Agentur {{standard.agency.name}} und zuletzt bearbeitet am {{ standard.last_modified_on}}. Der Standard wurde bereits {{standard.agencynetworkcounter}} mal geteilt.
+ Erstellt in Agentur {{standard.agency.name}} und zuletzt bearbeitet am {{ standard.last_modified_on}}. Der Standard wurde bereits {{standard.agencynetworkcounter}} mal übernommen.
@@ -77,20 +81,41 @@
+ {% getifuserdidcomment standard request.user as userdidcomment%}
+
+ {% if userdidcomment == False %}
+ {% else %}
+ Sie haben diesen Standard bereits kommentiert.
+ {% endif %}
-
Kommentieren
+ {% if userdidcomment == False %}
+
+ {% endif %}
{{comment.content}}
'+data['sc_c'] +'
'+data['sc_c'] +'