You should go with a MiddleWare. http://www.djangoproject.com/documentation/middleware/
Here is a basic example: from django.http import HttpResponseRedirect class AccessMiddleware(object): def process_request(self, request): # Insert your Auth Code if authorized: return None else: return HttpResponseRedirect("/?access-forbidden") Then in your settings.py : MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'my_project.my_app.middleware.AccessMiddleware', # has to be after common et session if you use them ) Remember that this code will be called for every page of your site, and you may need to add support for public zones, ... Have fun ! On Mar 13, 4:10 pm, "Stephen Mizell" <[EMAIL PROTECTED]> wrote: > I'm guessing this question has been answered somewhere, but I am > having a hard time finding an answer. I'll explain my question by way > of an example. Let's say I have a Weblog model which is related to a > Post model. I want many Weblogs on the site, and each Weblog can have > many Posts. My situation is, I want to be able to restrict access to > certain Weblogs (and everything associated with that Weblog such as > Posts) for certain people. What is the best method to do this? Would > I use the Site framework for this, and if so, is there a good tutorial > for this? I don't really want to make a new app for each Weblog, but > if that's the best way I'm down with it. > > If this has been posted somewhere, could someone kindly point me in > that direction? > > Thanks for your help. > > Stephen --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---