Hi ! Please try following steps , it would definitely work for you... Step1: Enable/Add 'django.contrib.auth.middleware.AuthenticationMiddleware', in your MIDDLEWARE_CLASSES section of 'settings.py' Step2:- Include/Modify following URL pattern in your 'urls.py' urlpatterns = patterns(' ', url(r'^login/$', 'django.contrib.auth.views.login', name='login'), url(r'^logout/ $','django.contrib.auth.views.logout', name='logout') ) Step3:- Put your 'templates' folder inside the 'mysite' and then put a folder namely 'registration' in your 'templates' folder, so that your folder structure looks like as follows -> mysite/templates/registration Step4:- Note your login,logout files inside 'registration' folder should posses following names respectively ('login.html','logged_out.html') Step5:- Now you can design your login/logout templates as you like, the above settings is enough to sort out the issue you have reported. -------------------------------------------------
On May 16, 8:05 pm, "francescobocca...@libero.it" <francescobocca...@libero.it> wrote: > hi, i have a question:i downloaded the templates folder but where i put it?i > create a project called "mysite". I changed settings.py and urls.py files as > you suggested.My question is: how i have to put the templates folder? i put > it inside mysite folder but when i try > tohttp://localhost:8000/accounts/logout/ > i received > Request Method: > GET > > Request URL: > http://localhost:8000/accounts/logout/ > > Django Version: > 1.3.1 > > Exception Type: > TemplateDoesNotExist > > Exception Value: > registration/logout.html > > Exception Location: > /usr/local/lib/python2.7/dist-packages/django/template/loader.py in > find_template, line 138 > > /usr/local/lib/python2.7/dist-packages/django/contrib/auth/templates/registration/logout.html > (File does not exist) > Can you help me to understand it? > Thanks > Francesco > > ----Messaggio originale---- > > Da: scoobygalle...@gmail.com > > Data: 16/05/2012 15.34 > > A: <django-users@googlegroups.com> > > Cc: "francescobocca...@libero.it"<francescobocca...@libero.it> > > Ogg: Re: Django-registration tutorial + code > > Hi! > You can go this way: > install the right version of django-registrationthis command will do the > trick:pip > installhttps://bitbucket.org/ubernostrum/django-registration/downloads/djang... > Add "registration" to installed apps, in your settings.py file:Something like > this:INSTALLED_APPS = ( .... 'registration', ....)Add the urls in > your urls.py file.something like this:urlpatterns = patterns('', > .... # django-registration url(r'^accounts/', > include('registration.backends.default.urls')), ....)Add the templates.I > created the template set and uploaded it for sharing > here:https://github.com/matiasherranz/scoobygalletas/tree/master/django-re... > That's it! > Let me know if you get stuck with something. > M.- > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > > To view this discussion on the web > visithttps://groups.google.com/d/msg/django-users/-/qNiVJV-uWV4J. > > 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 > athttp://groups.google.com/group/django-users?hl=en. -- 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.