YoloSwagTeam / hackeragenda

Gather events of hackerspaces/lug/numeric artists in belgium and put them in one big place. Made with love.
http://hackeragenda.be
GNU General Public License v3.0
29 stars 21 forks source link

admin interface not working #61

Closed gdesmott closed 10 years ago

gdesmott commented 10 years ago

Fresh install, /admin doesn't work:

Internal Server Error: /admin/ Traceback (most recent call last): File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, _callback_kwargs) File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 219, in wrapper return self.admin_view(view, cacheable)(_args, _kwargs) File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, _args, _kwargs) File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func response = view_func(request, _args, _kwargs) File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 196, in inner if not self.has_permission(request): File "/home/cassidy/tmp/hackeragenda/ve/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 149, in has_permission return request.user.is_active and request.user.is_staff AttributeError: 'WSGIRequest' object has no attribute 'user' [19/Jun/2014 01:26:33] "GET /admin/ HTTP/1.1" 500 363358

Psycojoker commented 10 years ago

Oh, that's because I've removed cookies from HackerAgenda (the middleware) because that was useless at that time (and I didn't want to put a useless cookies on the user).

gdesmott commented 10 years ago

Maybe put them back in debug mode; if only for the admin interface?

Psycojoker commented 10 years ago

I'll probably hack it to only have it on the admin IF and on the futur events management page. In the mean time you can uncomment the lines of "MIDDLEWARE_CLASSES" in hackeragenda/settings.py, I think that it should do the trick.

And don't hesitate to send a patch implementing this behavior when DEBUG=True :)