Changes between Version 6 and Version 7 of CookBookIPAccessMiddleware


Ignore:
Timestamp:
Dec 21, 2006, 6:04:57 PM (18 years ago)
Author:
Manuel Saelices <msaelices@…>
Comment:

another fix

Legend:

Unmodified
Added
Removed
Modified
  • CookBookIPAccessMiddleware

    v6 v7  
    99You must define a model that permits defining a tuple (ip addr, user): ip from browser that connect, and users that authenticated.
    1010
    11 This is the model proposed (it would be in a file like ''myapp/models.py''):
     11This is the model proposed (it would be in a file like ''myproj/myapp/models.py''):
    1212
    1313{{{
     
    3636Middleware mission is authenticate automatically with an user defined in models, '''only if''' the remote ip address exists in ''IPAccess'' table.
    3737
    38 This is the code (in file ''myapp/middleware.py''):
     38This is the code (in file ''myproj/myapp/middleware.py''):
    3939
    4040{{{
    4141
    4242from django.contrib.auth.models import AnonymousUser
    43 from myapp.models import IPAccess
     43from myproj.myapp.models import IPAccess
    4444
    4545class IPAccessMiddleware(object):
Back to Top