This commit is contained in:
Ross
2022-06-08 18:45:34 +01:00
parent 3588448221
commit 773cd6c864
2 changed files with 4 additions and 42 deletions
+3 -3
View File
@@ -201,9 +201,9 @@ class CidUserForm(ModelForm):
instance.rapid_exams.clear()
for rapid_exams in self.cleaned_data["rapid_exams"]:
instance.rapid_exams.add(rapid_exams.pk)
instance.longs_exams.clear()
for longs_exams in self.cleaned_data["longs_exams"]:
instance.longs_exams.add(longs_exams.pk)
#instance.longs_exams.clear()
#for longs_exams in self.cleaned_data["longs_exams"]:
# instance.longs_exams.add(longs_exams.pk)
instance.casecollection_exams.clear()
for casecollection_exams in self.cleaned_data["casecollection_exams"]:
instance.longs_exams.add(casecollection_exams.pk)
+1 -39
View File
@@ -207,45 +207,7 @@ INTERNAL_IPS = ["localhost", "127.0.0.1"]
# "level": "DEBUG",
# },
#}
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
# Include the default Django email handler for errors
# This is what you'd get without configuring logging at all.
'mail_admins': {
'class': 'django.utils.log.AdminEmailHandler',
'level': 'ERROR',
# But the emails are plain text by default - HTML is nicer
'include_html': True,
},
# Log to a text file that can be rotated by logrotate
'logfile': {
'class': 'logging.handlers.WatchedFileHandler',
'filename': '/var/log/django/myapp.log'
},
},
'loggers': {
# Again, default Django configuration to email unhandled exceptions
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
# Might as well log any errors anywhere else in Django
'django': {
'handlers': ['logfile'],
'level': 'ERROR',
'propagate': False,
},
# Your own app - this assumes all your logger names start with "myapp."
'myapp': {
'handlers': ['logfile'],
'level': 'WARNING', # Or maybe INFO or DEBUG
'propagate': False
},
},
}
CORS_ORIGIN_ALLOW_ALL = True