I am using django version 1.2.5 Here could you please point this glitch NavaTux <navaneethanit <at> gmail.com> writes:
> > Here just i am authenticating a user in django and logout him > > authentication view is working fine and i wriiten a log out view which > is here > > def view_logout(request): > from django.contrib.auth import logout as django_logout > django_logout(request) > return HttpResponseRedirect(urlresolvers.reverse('login')) > > this is my template content which is given the link to logout > > " <li><a href="/logout/">Logout</a></li> " > > when rendering this application , it asks username and password , > after given both, home page is being displayed then clicking Logout > url > it displays the below error > > Traceback:: > > ""Environment: > > Request Method: GET > Request URL: http://127.0.0.1:8000/logout/ > > Django Version: 1.3 > Python Version: 2.6.5 > Installed Applications: > ['django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'options_alpha'] > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.middleware.csrf.CsrfResponseMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware') > > Traceback: > File "/home/hirelex/workspace/optionsalpha/lib/python2.6/site-packages/ > django/core/handlers/base.py" in get_response > 111. response = callback(request, > *callback_args, **callback_kwargs) > > Exception Type: TypeError at /logout/ > Exception Value: 'str' object is not callable"" > > I am using latest django 1.3 and i did editing the middleware classes > to avoid the error "CSRF token verification failed" by following this > link <http://josh.gourneau.com/blog/2010/02/17/django-12-csrf- > verification-failed/>.then it works fine > > The logout function makes the problem > > hope you will point this error > > if you need any information i ll give > -- --------------- regards, NavaTux <navaneetha...@gmail.com> It blogs @ http://navaspot.wordpress.com http://twitter.com/NavaTux -- 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.