On Mon, Mar 14, 2011 at 5:21 AM, sahana bhat <sahanabha...@gmail.com> wrote: > I am getting this error when i try to activate the admin site... i > followed all the steps of the django tutorials..... please help... > > AttributeError at /admin/ > 'WSGIRequest' object has no attribute 'user' > > This is the stack trace.. > Traceback (most recent call last): > > File "C:\Python26\lib\site-packages\django\core\servers > \basehttp.py", line 280, in run > self.result = application(self.environ, self.start_response) > > File "C:\Python26\lib\site-packages\django\core\servers > \basehttp.py", line 674, in __call__ > return self.application(environ, start_response) > > File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py", > line 248, in __call__ > response = self.get_response(request) > > File "C:\Python26\lib\site-packages\django\core\handlers\base.py", > line 141, in get_response > return self.handle_uncaught_exception(request, resolver, > sys.exc_info()) > > File "C:\Python26\lib\site-packages\django\core\handlers\base.py", > line 180, in handle_uncaught_exception > return callback(request, **param_dict) > > File "C:\Python26\lib\site-packages\django\utils\decorators.py", > line 76, in _wrapped_view > response = view_func(request, *args, **kwargs) > > File "C:\Python26\lib\site-packages\django\views\defaults.py", line > 30, in server_error > t = loader.get_template(template_name) # You need to create a > 500.html template. > > File "C:\Python26\lib\site-packages\django\template\loader.py", line > 157, in get_template > template, origin = find_template(template_name) > > File "C:\Python26\lib\site-packages\django\template\loader.py", line > 138, in find_template > raise TemplateDoesNotExist(name) > > TemplateDoesNotExist: 500.html > > > > Snippets of my settings.py file: > > MIDDLEWARE_CLASSES = ( > > ) > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.admin', > 'newsite.employees', > 'polls', > ) > TEMPLATE_CONTEXT_PROCESSORS = > ( 'django.core.context_processors.debug', > 'django.core.context_processors.i18n', > 'django.core.context_processors.auth', ) >
Your site isn't working correctly, and there is no 500 template to display the error, so you get a double failure. Turn on DEBUG, or provide a valid 500 error template so that you can determine why your site isn't working. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.