If you want to use the existing permission system, I think you'll find this is what you need: https://docs.djangoproject.com/en/1.4/topics/auth/#the-permission-required-decorator

You could add some extra permissions to your models too if you need them: https://docs.djangoproject.com/en/1.4/ref/models/options/#permissions

Kind regards
Phil

On 30/03/2012 10:28, vanderkerkoff wrote:
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



--

Philip Mountifield
Formac Electronics Ltd
tel  +44 (0) 1225 837333
fax  +44 (0) 1225 430995

pmountifi...@formac.net
www.formac.net
www.telgas.net

--
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.

Reply via email to