Friday, March 30, 2012

Using the backend database to secure a page on the frontend

Hello there

I"m sure this question has been answered before but I just can't find
it, apologies.

We've got a django 1.1.2 site and I need to secure some sections of
the frontend, and use the users and groups model in the backend as the
database to provide authentication.

I really don't know where to start to be honest.

Any links to examples would be great.

What would be really great is if there's a way in the urls.py file to
do something like this.

from django.contrib.auth.models import *
urlpatterns += patterns('django.auth.authenticate',
(r'^specificurl$',")
)

If I get it working on specific URLS first, I can then start to work
out how to incorporate the login section into parts of the app. So
people could tick a page say as restricted, and then people would have
to login to see the page.

Any tips or links off to documentation would be really helpful.

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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment