Re: Apache auth
Hi What I'm currently using: Server Version: Apache/2.2.3 (Ubuntu) DAV/2 mod_python/3.2.10 Python/2.5.1 And one of my apache directives: #full size images PythonPath "['/home/sean/whav'] + sys.path" PythonOption DJANGO_SETTINGS_MODULE whav.settings-sean-apache PythonOption DjangoPermissionName 'whav_db.full_images' PythonAccessHandler whav.modpython::accesshandler_full SetHandler None You were right about the SetHandler thing, it really shouldn't be set to python-program. hope that helps, Sean David Reynolds wrote: > > Sean, > > On 22 Jun 2007, at 10:26 am, Sean Mc Allister wrote: > >> Hi, >> I haven't seen this error myself yet, but you could try to use the patch >> here: >> http://code.djangoproject.com/ticket/3583 >> SmileyChris was so nice as to improve my initial patch, and possibly >> this will sooner or later even make it into trunk. > > Can I ask what mod_python/apache versions you are using? > > I can fairly consistently get this error, however I have to replace: > > SetHandler python-program > > with: > > SetHandler none > > or else I get a 404 from django. > > Perhaps I am missing something? > > Thanks, > > Dave > > --David Reynolds > [EMAIL PROTECTED] > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Apache auth
Hi, I haven't seen this error myself yet, but you could try to use the patch here: http://code.djangoproject.com/ticket/3583 SmileyChris was so nice as to improve my initial patch, and possibly this will sooner or later even make it into trunk. cheers, Sean David Reynolds wrote: > Hi, > > I've been playing with the apache auth from djangosnippets [0] and > I've had it working, but it now seems to be erroring a lot with the > following error: > > Mod_python error: "PythonAccessHandler historymagazine.modpython" > > Traceback (most recent call last): > > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line > 287, in HandlerDispatch > log=debug) > > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line > 464, in import_module > module = imp.load_module(mname, f, p, d) > > File "/var/www/django/historymagazine/modpython.py", line 2, in ? > from django.core.handlers.base import BaseHandler > > ImportError: No module named django.core.handlers.base > > Anyone have any ideas why this might be happening? > > Thanks, > > David > > [0 - http://www.djangosnippets.org/snippets/62/] > --David Reynolds > [EMAIL PROTECTED] > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mysql sleeping queries
Just to let you know, I'm using postgres and I am also experiencing the same problems with revisions above 5481. It doesn't seem to leave every connection open, but more like 2 out of 3 or something like that. so it's not only a mysql thing. Sean David Reynolds wrote: > > On 19 Jun 2007, at 5:16 pm, Gábor Farkas wrote: >> >> i'm glad this fixed your problem, but please note that: >> >> from the information you provided, we know that 5481 works, but 5492 >> does not. but this does not mean that 5481 broke it. there are still 10 >> revisions (starting with 5482 and ending with 5491) which might or might >> not work. >> >> so if you have the possibility, please try to investigate which exact >> revision broke it for you. >> >> a simple binary search would work, like..try the "version in the middle" >> (5486). if works, then 5499, if does not work then 5484 etc. > > We have done some testing and it does seem to appear in 5482, as > Malcolm suggested. 5481 is fine, 5482 starts the hanging mysql processes. > > Hope that helps, > > David > --David Reynolds > [EMAIL PROTECTED] > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
subclassing form_for_model
Hi, can somebody give me a hint how to subclass a form_for_model class? I have read ticket 3815, but that doesn't seem to work too well for me. If I simply subclass the Form, the new fields aren't added if I subclass with argument form=newforms.Form only the new fields are there (see below for details) Any suggestions? thanks, Sean In [1]: from django import newforms as forms In [2]: from polls import models In [4]: PollForm = forms.form_for_model(models.Poll) In [6]: class PollFormWithTest(PollForm): ...: test = forms.CharField() In [7]: testForm=PollFormWithTest() In [8]: testForm.fields Out[8]: {'question': , 'pub_date': } In [9]: testForm.test Out[9]: # Now the recommended way (http://code.djangoproject.com/ticket/3815) In [13]: PollForm2 =forms.form_for_model(models.Poll,form=forms.Form) In [14]: class PollFormWithTest(PollForm2): test = forms.CharField() : In [16]: testForm=PollFormWithTest() In [17]: testForm.fields Out[17]: {'test': } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---