Great project! Really hoping to use this in production for a class I'm teaching in a couple of weeks.
I have a problem with setting DEBUG = False, which gives a 500 error, even with ALLOWED_HOSTS set to '*' or '127.0.0.1'.
I'm using python 3.4.3 and Django 1.11.5. The error log is below.
Any ideas would be wonderful!
Austen
[23/Sep/2017 22:27:03] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:27:03] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:27:03] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
[23/Sep/2017 22:27:03] ERROR [django.request:135] Internal Server Error: /
Traceback (most recent call last):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, callback_args, callback_kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args,kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request,args, kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
return render(request, self.template_name, template_context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
return template.render(context, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
return self.template.render(context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
with context.bind_template(self):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
return next(self.gen)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
context = processor(self.request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
ret = super(Serializer, self).data
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
self._data = self.to_representation(self.instance)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
return method(value)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
return serialize_acl(obj)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
serializer(serialized_acl)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
for category, acl in serialized_acl.pop('categories').items():
AttributeError: 'list' object has no attribute 'items'
[23/Sep/2017 22:27:03] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
[23/Sep/2017 22:27:09] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:27:09] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:27:09] ERROR [django.request:135] Internal Server Error: /
Traceback (most recent call last):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args,callback_kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, args, kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request, *args,kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
return render(request, self.template_name, template_context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
return template.render(context, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
return self.template.render(context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
with context.bind_template(self):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
return next(self.gen)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
context = processor(self.request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
ret = super(Serializer, self).data
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
self._data = self.to_representation(self.instance)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
return method(value)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
return serialize_acl(obj)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
serializer(serialized_acl)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
for category, acl in serialized_acl.pop('categories').items():
AttributeError: 'list' object has no attribute 'items'
[23/Sep/2017 22:27:09] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
[23/Sep/2017 22:27:09] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
[23/Sep/2017 22:31:43] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:31:43] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:31:44] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
[23/Sep/2017 22:31:44] ERROR [django.request:135] Internal Server Error: /
Traceback (most recent call last):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request,callback_args, callback_kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args,kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request, args, kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
return render(request, self.template_name, template_context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
return template.render(context, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
return self.template.render(context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
with context.bind_template(self):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
return next(self.gen)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
context = processor(self.request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
ret = super(Serializer, self).data
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
self._data = self.to_representation(self.instance)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
return method(value)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
return serialize_acl(obj)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
serializer(serialized_acl)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
for category, acl in serialized_acl.pop('categories').items():
AttributeError: 'list' object has no attribute 'items'
[23/Sep/2017 22:31:44] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063
[23/Sep/2017 22:31:45] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:31:45] WARNING [django.security.SuspiciousSession:117] Session data corrupted
[23/Sep/2017 22:31:45] ERROR [django.request:135] Internal Server Error: /
Traceback (most recent call last):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args,callback_kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request,args, kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request, *args,kwargs)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/threads/views/list.py", line 27, in get
return render(request, self.template_name, template_context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/loader.py", line 68, in render_to_string
return template.render(context, request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/backends/django.py", line 66, in render
return self.template.render(context)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/django/template/base.py", line 205, in render
with context.bind_template(self):
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/contextlib.py", line 59, in enter
return next(self.gen)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/debug_toolbar/panels/templates/panel.py", line 49, in _request_context_bind_template
context = processor(self.request)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/context_processors.py", line 41, in preload_user_json
request.frontend_context.update({'user': AnonymousUserSerializer(request.user).data})
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 534, in data
ret = super(Serializer, self).data
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 263, in data
self._data = self.to_representation(self.instance)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/serializers.py", line 501, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/rest_framework/fields.py", line 1755, in to_representation
return method(value)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/users/serializers/auth.py", line 81, in get_acl
return serialize_acl(obj)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/acl/api.py", line 63, in serialize_acl
serializer(serialized_acl)
File "/Users/austen/Code/tqm_forum/misago/lib/python3.4/site-packages/misago/categories/permissions.py", line 95, in serialize_categories_alcs
for category, acl in serialized_acl.pop('categories').items():
AttributeError: 'list' object has no attribute 'items'
[23/Sep/2017 22:31:45] INFO [django.server:124] "GET /api/threads/?category=2&list=all HTTP/1.1" 200 136
[23/Sep/2017 22:31:45] ERROR [django.server:124] "GET / HTTP/1.1" 500 3063