Re: apache authentication using Django on windows

2008-11-05 Thread Steven Armstrong
Matt wrote on 11/05/08 16:26: > Hi, > > I have Django running on Apache 2.2 on windows. I am attempting to > use django authentification to secure an apache folder using this > configuration: > > > > AuthType Basic > AuthName "mysite.com" > AuthUserFile /dev/null > AuthBasicAu

Re: apache authentication using Django on windows

2008-11-05 Thread Matt
That worked. Thanks! On Nov 5, 3:41 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > Have you tried to create an empty file and use the filename as AuthUserFile? > >   Thomas > > Matt schrieb: > > > > > Hi, > > > I have Django running on Apache 2.2 on windows.  I am attempting to > > use

Re: apache authentication using Django on windows

2008-11-05 Thread Thomas Guettler
Hi, Have you tried to create an empty file and use the filename as AuthUserFile? Thomas Matt schrieb: > Hi, > > I have Django running on Apache 2.2 on windows. I am attempting to > use django authentification to secure an apache folder using this > configuration: > > > > AuthType Basic

Re: Apache authentication: AttributeError: 'module' object has no attribute 'auth'

2006-10-06 Thread Graham Dumpleton
[EMAIL PROTECTED] wrote: > Hi.. thanks for your replies guys. > > You're probably right... I'm running mod_python from the Ubuntu dapper > repositories which currently has version 3.1.4. Unfortunately the Edgy > package (which is 3.2.8) depends on a newer version of libc6 which > means that I rea

Re: Apache authentication: AttributeError: 'module' object has no attribute 'auth'

2006-10-06 Thread [EMAIL PROTECTED]
Hi.. thanks for your replies guys. You're probably right... I'm running mod_python from the Ubuntu dapper repositories which currently has version 3.1.4. Unfortunately the Edgy package (which is 3.2.8) depends on a newer version of libc6 which means that I really don't want to upgrade the package

Re: Apache authentication: AttributeError: 'module' object has no attribute 'auth'

2006-10-05 Thread Graham Dumpleton
[EMAIL PROTECTED] wrote: > Hello. I'm trying to get Apache to authenticate users using Django's > user database but I'm getting the above error (the whole apache error > log is at the bottom of the message). > > I've set up my project and created users using the Django development > server so the

Re: Apache authentication: AttributeError: 'module' object has no attribute 'auth'

2006-10-05 Thread RajeshD
Hi Stefan, What version of Apache and mod_python are you using? -Raj --~--~-~--~~~---~--~~ 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 unsu

Re: Apache Authentication

2006-01-07 Thread Adrian Holovaty
On 1/7/06, Brian Ray <[EMAIL PROTECTED]> wrote: > btw, I will fill out a Trac ticket for the modpython.py fix, just in > case this thread get's lost in cyberspace. Thanks for the ticket and patch! I've committed it. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Apache Authentication

2006-01-07 Thread Brian Ray
This is in my view *after* the Authenticaion: def login(request): user = users.get_object(username__exact=request.META['REMOTE_USER'] request.session[users.SESSION_KEY] = user.id request.user = user # do something else ... Seems to make both Django and Apache happy. Regards, Brian

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Thanks Ian. But, this is not really what I am doing here. I do not want to create users from Apache. Kind Regards, Brian

Re: Apache Authentication

2006-01-07 Thread Ian Holsman
Hi Brian. I wrote a http auth middleware along time ago, I haven't used Adrian's. http://svn.zilbo.com/svn/django/common/middleware/httpauth.py this might work for you. it was written before Adrian's version but it works well in my environment. It just hands the Auth over to apache, and creates

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Anouther issues with Authenticating this way, the Django user is still Anonymous although the REMOTE_USER is not: , POST:, COOKIES:{}, META:{'AUTH_TYPE': 'Basic', 'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip,

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Adrian, I took a look at modpython.py. I changed line 16 to: _str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes') Note the parethesis. Seems to work now. Cool, Thanks!

Re: Apache Authentication

2006-01-07 Thread Adrian Holovaty
On 1/7/06, Brian Ray <[EMAIL PROTECTED]> wrote: "/usr/local/lib/python2.4/site-packages/django/contrib/auth/handlers/modpython.py", > line 20, in authenhandler > staff_only = _str_to_bool(options.get('DjangoRequireStaffStatus', > "on")) > > TypeError: 'tuple' object is not callable Ooooh, tha

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Hi Adrian: When placed together, I do get asked for Authentication from browser. When good credentials are provided, I do get through but then an error is displayed. I would like to determine wether or not I am doing something wrong. Otherwise, can log this intro Trac as a feature request? -- B

Re: Apache Authentication

2006-01-06 Thread Adrian Holovaty
On 1/6/06, Brian Ray <[EMAIL PROTECTED]> wrote: > I see it's possible to `Authenticate against Django database from > Apache `_. I > would like to experiment with using Apache Authentication for Django > instead of a login webpage, as well.