Re: How to import this module

2009-06-05 Thread David
thanks for your information. it is quite helpful. thanks again. On Jun 5, 9:27 am, Daniel Roseman wrote: > On Jun 5, 5:17 pm, David wrote: > > > I am trying to set up a user login page. A user needs to login first > > before he/she can do anything. > > > I refered: "http://superjared.com/entry

Re: How to import this module

2009-06-05 Thread Daniel Roseman
On Jun 5, 5:17 pm, David wrote: > I am trying to set up a user login page. A user needs to login first > before he/she can do anything. > > I refered: "http://superjared.com/entry/requiring-login-entire-django- > powered-site/" > > "Then put myproject.middleware.SiteLogin in your MIDDLEWARE_CLASS

Re: How to import this module

2009-06-05 Thread David
I am new in this Django field so please do not get surprised when you see my stupid errors. any more suggestions on how to set up a user login page? Thanks. On Jun 5, 9:17 am, David wrote: > I am trying to set up a user login page. A user needs to login first > before he/she can do anything.

Re: How to import this module

2009-06-05 Thread David
I am trying to set up a user login page. A user needs to login first before he/she can do anything. I refered: "http://superjared.com/entry/requiring-login-entire-django- powered-site/" "Then put myproject.middleware.SiteLogin in your MIDDLEWARE_CLASSES in settings.py (replace myproject with you

Re: How to import this module

2009-06-05 Thread Daniel Roseman
On Jun 5, 4:58 pm, David wrote: > Middleware class: > > MIDDLEWARE_CLASSES = ( >     'django.middleware.common.CommonMiddleware', >     'django.contrib.sessions.middleware.SessionMiddleware', >     'django.contrib.auth.middleware.AuthenticationMiddleware', >     'mysite.middleware.SiteLogin', > )

Re: How to import this module

2009-06-05 Thread Daniel Roseman
On Jun 5, 4:47 pm, David wrote: > Thanks DR. I did put  'mysite.middleware.SiteLogin' into > MIDDLEWARE_CLASSES  in settings.py already, however I still get > > Exception Value: name 'process_request' is not defined Please post the full traceback. -- DR. --~--~-~--~~~

Re: How to import this module

2009-06-05 Thread David
Middleware class: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'mysite.middleware.SiteLogin', ) === urls.py: from django.conf.urls.de

Re: How to import this module

2009-06-05 Thread David
Thanks DR. I did put 'mysite.middleware.SiteLogin' into MIDDLEWARE_CLASSES in settings.py already, however I still get Exception Value: name 'process_request' is not defined On Jun 5, 8:35 am, Daniel Roseman wrote: > On Jun 5, 3:51 pm, David wrote: > > > Hello, > > > In my project "mysit

Re: How to import this module

2009-06-05 Thread Alex Gaynor
On Fri, Jun 5, 2009 at 10:35 AM, Daniel Roseman < roseman.dan...@googlemail.com> wrote: > > On Jun 5, 3:51 pm, David wrote: > > Hello, > > > > In my project "mysite" directory I have "middleware.py". This > > "middleware.py" has only one class "SiteLogin" and this class has only > > one method "p

Re: How to import this module

2009-06-05 Thread Daniel Roseman
On Jun 5, 3:51 pm, David wrote: > Hello, > > In my project "mysite" directory I have "middleware.py". This > "middleware.py" has only one class "SiteLogin" and this class has only > one method "process_request". > > Now I need to import this "process_request" into "urls.py" in the > "mysite" dire