If I understand correctly, you want the ordinary users to login to the admin login page. That is not how it works. You need to specify a url that will point to django.contrib.auth.views if you want to use the built-in authentication framework. I use / accounts just to keep it clean.
#urls.py (r'^accounts/', include('django.contrib.auth.urls')), Now you can just provide the templates in a folder named registration/ in your template directory to display your forms. Note that this includes all of the views like logout, password change, etc. If you just want to use the login, you can do it like below, in which you may also specify the templates in urls.py: #urls.py (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'myapp/login.html'}), -- Gladys http://bixly.com On Mar 12, 5:41 am, hank23 <hversem...@stchas.edu> wrote: > I'm trying to use the the built-in authentication framework/middlework > but so far haven't figured out how to use it correctly. I'm just > starting a new project with this and I have placed the > "@login_required" decorator in front of my first view and want to > force the user to login at this time. I have coded the > "settings.LOGIN_URL" with a value of "/admin/" and this forces the > user to the admin screen, but doesn't redirect after that point it > does not redirect, though the new url that is displayed in the browser > window's address field shows the correct original url but appended > after the "/admin/" portion of the request like this: > > /admin/?next=/mymedia/ > > It just stays on the successfull login/admin screen. What am I > missing? I would appreciate any help I can get on this. Thanks. -- 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.