Re: Reloading only one Python interpreter with Apache

2007-11-03 Thread Kenneth Gonsalves
On 03-Nov-07, at 8:57 PM, Sander Dijkhuis wrote: > I often have to reload one project because I've updated the code. > Currently, I use `/etc/init.d/apache2 reload` why dont you do apache2ctl graceful? -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~--

Re: IOError: Client read error (Timeout?)

2007-11-03 Thread Graham Dumpleton
FWIW, the Python 2.5 source code violates its own documentation if this is in some way meant to define a standard. That is, in zip and bz2 modules, they raise IOError's with only a string value and no errno. Graham On Nov 4, 9:32 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > FWIW, it has bee

Re: to_python ignored with custom IntegerField

2007-11-03 Thread Marty Alchin
Also, note that I just put up a new patch for adding a DurationField[1] and I just blogged about it as well.[2] Hopefully this will help you out. -Gul [1] http://code.djangoproject.com/ticket/2443 [2] http://gulopine.gamemusic.org/2007/11/storing-passages-of-time.html --~--~-~--~~--

Re: djangoAMF authentication, requests aren't carrying user credential

2007-11-03 Thread Graham Dumpleton
More likely then to be an application issue than something with mod_wsgi. Beyond wrapping the WSGI entry point for Django and dumping out request headers and response headers and confirming that any cookie stuff is correct, not sure what to suggest. Graham On Nov 3, 11:23 am, "Tiger Uppercut" <

Re: Large streaming uploads (#2070) doesn't work for me at all

2007-11-03 Thread Graham Dumpleton
You might at least try mod_python 3.3.1 instead of the older mod_python 3.2.10. The newer version fixes a lot of problems including memory leaks. Graham On Nov 4, 10:48 am, Eugene Morozov <[EMAIL PROTECTED]> wrote: > Hello, > I've applied patch from #2070 and I have disastrous result. I'm trying

Re: Reloading only one Python interpreter with Apache

2007-11-03 Thread Graham Dumpleton
On Nov 4, 2:27 am, Sander Dijkhuis <[EMAIL PROTECTED]> wrote: > On our Apache server, we're hosting multiple Django projects. The > Apache configuration is like this: > > PythonAutoReload Off > > ServerName first.example.com > > SetHandler python-program > Set

Re: to_python ignored with custom IntegerField

2007-11-03 Thread Malcolm Tredinnick
On Sun, 2007-11-04 at 04:08 +0100, Stefan Foulis[spiderware gmbh] wrote: > Hi > I've tried to create a custom Field for the database to store > Timedelta objects. Since I only need exactness to the minute and won't > have any large timedeltas I'm using a simple Integer to store it in > the d

Re: 3 questions about user-defined Field types

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 21:40 -0500, Tim Chase wrote: [...] > I know it's generally bad form to change > configuration settings between testing/development/production, > but such isolated changes make appropriate functionality > available when needed and remove it when a proven solution works. Well

Re: form submission -> @login_required -> get form submission data

2007-11-03 Thread James Bennett
On 11/2/07, crybaby <[EMAIL PROTECTED]> wrote: > I want to display the form even when the user is not logged in, but > want to allow them to do form submission. So when they post the data, > @login_required decorator is called on one of the view functions. Now > user logs in and I want the earli

to_python ignored with custom IntegerField

2007-11-03 Thread Stefan Foulis [spiderware gmbh]
Hi I've tried to create a custom Field for the database to store Timedelta objects. Since I only need exactness to the minute and won't have any large timedeltas I'm using a simple Integer to store it in the database. Maybe I'll make this configurable later. this is the code: f

Re: form submission -> @login_required -> get form submission data

2007-11-03 Thread crybaby
I guess you have to use session to store the data, check if user is authenticated inside the view, if not redirect to login page. Also set the hidden input type so that after the logging in, it will be routed back to the original view. --~--~-~--~~~---~--~~ You re

Re: 3 questions about user-defined Field types

2007-11-03 Thread Tim Chase
Malcolm, Thanks for taking the time to look into my questions. >> I'd like to build some automated tests as I go along, but I'm not >> sure how to go about building a test harness that creates a >> temporary model with my field-type, creates a table in the DB >> with that field in it, and then p

How to implement a search box for my website?

2007-11-03 Thread Greg
Hello, I've created a django website where I sell many different products, that differ by color, manufacturer, size, price, shape, etc... I'm wondering what the best way to implement a search box would be. I'd want this search box to return only the products that relate to what the user searches

Re: newforms and multiple forms objects in one html form question

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 14:32 -0700, Sean Perry wrote: > I have a html form which will create an instance of a model plus its > m2m relations. So you have something like: > > MainModelField1 > MainModelField2 > MainModelField3 > ... > m2mModelField1a, m2mModelField1b, m2mModelField1c > m2mModelFi

Re: 3 questions about user-defined Field types

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 10:58 -0500, Tim Chase wrote: > Using this section of the Master Class notes found here > > http://toys.jacobian.org/presentations/2007/oscon/tutorial/#s103 > > I've been working to create a custom field-type for consolidating > some of my work that was previously duplicate

Re: Admin logout fails in r6447

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 08:38 -0700, Dokter Bob wrote: > Dear people, > > After upgrading our Django distribution we found that it seems > inpossible to log out of the admin interface. > Are we the only ones experiencing this problem? Should I file a bug? Logout works fine, in general (I just test

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 13:13 +, omat wrote: > Here is the traceback: > > Traceback (most recent call last): > File "update_feeds.py", line 171, in process_feed > process_entry(entry, fpf, feed, postdict) > File "update_feeds.py", line 119, in process_entry > feed.tags)) > File "/

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 14:51 +, omat wrote: > I have experimented both with the subject and the message. They both > expose the same problem when the name contains non-ascii chars. > > As a hack, I started using the slug field instead of the name field > both in the message template and the su

Re: keeping SECRET_KEY secret

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 13:06 -0500, Carl Karsten wrote: > birkin wrote: > > This issue of how to best organize private and local django settings > > came up at a recent hackfest I attended. Some googling revealed > > postings by Adrian and others that essentially noted that it's > > reasonable to a

Re: permissions on media files

2007-11-03 Thread RajeshD
> So is my only solution to read and serve the file > using django ? Or is there a mod_python extension that can do this > more efficiently ? Perhaps Amazon S3 would serve your needs? http://www.amazon.com/gp/browse.html?node=16427261 --~--~-~--~~~---~--~~ You r

permissions on media files

2007-11-03 Thread kan
I have a custom security model, where users are given object level permissions on html pages etc. However I have large media files which I would like to control access to. For example I have a video file which I want to serve only to certain users if they have permission. If I serve using static_s

Large streaming uploads (#2070) doesn't work for me at all

2007-11-03 Thread Eugene Morozov
Hello, I've applied patch from #2070 and I have disastrous result. I'm trying to upload a 12Mb PNG file. Apache starts eating memory rapidly, consuming several Gb in seconds and I have to kill it (if I have enough time to log in as root and find pid of the httpd process). I'm using Django trunk (

Large streaming uploads (#2070) doesn't work for me at all

2007-11-03 Thread Eugene Morozov
Hello, I've applied patch from #2070 and I have disastrous result. I'm trying to upload a 12Mb PNG file. Apache starts eating memory rapidly, consuming several Gb in seconds and I have to kill it (if I have enough time to log in as root and find pid of the httpd process). I'm using Django trunk (

Re: Unable to Login To Admin Interface

2007-11-03 Thread [EMAIL PROTECTED]
I fixed it by reinstalling Django. I still don't know what the problem was, but it's working now :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: IOError: Client read error (Timeout?)

2007-11-03 Thread Graham Dumpleton
FWIW, it has been noted as an issue with mod_python that using IOError directly isn't good, although for slightly other reasons. https://issues.apache.org/jira/browse/MODPYTHON-92 That it isn't using IOError correctly in as much as no errno is present adds to why it shouldn't do as it is. It

newforms and multiple forms objects in one html form question

2007-11-03 Thread Sean Perry
I have a html form which will create an instance of a model plus its m2m relations. So you have something like: MainModelField1 MainModelField2 MainModelField3 ... m2mModelField1a, m2mModelField1b, m2mModelField1c m2mModelField2a, m2mModelField2b, m2mModelField2c ... hidden_count In my view

DateTime Picker

2007-11-03 Thread Alex Ezell
When I use a DateTime field in my model, the admin automatically creates a little javascript date picker. How do I get the same date picker in my user forms? I am using the form_from_model method with newforms. Thanks! /alex --~--~-~--~~~---~--~~ You received th

Re: keeping SECRET_KEY secret

2007-11-03 Thread Sean Perry
On Nov 2, 2007, at 6:02 AM, James Bennett wrote: > Personally I wonder if this is due to a conception that the *project* > is somehow the deliverable; I can understand how that conception would > be easy to form from the documentation, and I've suggested more than > once that the docs should empha

Re: Is it possible to debug a view using breakpoints in Eclipse?

2007-11-03 Thread crybaby
Breakpoint works if you set it and run in debug mode (click the bug button, not the play button), don't run it in run mode and expect breakpoint to work. That's what I was doing. Now I have one more problem: I have selected a form object and a variable to watch and set the breakpoints, but when

Re: Newforms validation error not displayed:

2007-11-03 Thread RajeshD
> > def clean_guess_the_number(self): > if self.max_number > self.cleaned_data['guess_the_number']: Change that to: if self.max_number < self.cleaned_data['guess_the_number']: > raise forms.ValidationError('Your Number have to be lower > or equal to Max Number.') >

Re: i18n and choices from database

2007-11-03 Thread sircco
tnx, works even with internationalized data! Damir On Nov 3, 7:38 pm, RajeshD <[EMAIL PROTECTED]> wrote: > > Question is how to show query from database on template with localized > > output > > Try this in your template (assuming p is a person model instance > available to your template): > >

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread RajeshD
Take a look at your Tag model's __unicode__ method (or paste your Tag model here). I suspect that's where the problem is. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: i18n and choices from database

2007-11-03 Thread RajeshD
> Question is how to show query from database on template with localized > output Try this in your template (assuming p is a person model instance available to your template): {{ p.get_gender_display }} See: http://www.djangoproject.com/documentation/db-api/#get-foo-display Also, another sugge

Re: GeoDjango

2007-11-03 Thread Jeremy Dunck
It's still a bit early in GeoDjango's life and functionality. Conversation has been occasional and with a relatively small number of participants. I haven't heard any complaints about the topics for discussion. I agree that GIS stuff may be a bit out of scope for dj-u, but as it pertains to bugs

i18n and choices from database

2007-11-03 Thread sircco
lets say i have a model from django.utils.translation import ugettext_lazy as _ class Person (models.Model): GENDER = ( (0, _('Male'), (1,_('Female') ) name = models.CharField(maxlength=100) gender = models.IntegerField(choic

i18n and choices from database

2007-11-03 Thread sircco
lets say i have model . . class Person (models.Model): CHOICE = ( (0,_("m"), (1,_("f")) gender = models.IntegerField( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Karen Tracey
On 11/3/07, omat <[EMAIL PROTECTED]> wrote: > "repr(sbj)"= str: u'new tag: Arkada\u015flar\u0131n' The str: prefix on that looks a little odd. I'm also confused how you got repr(sbj) if (as according to the traceback) the exception occurs on the line preceding the assignment of sbj? What exact

Re: keeping SECRET_KEY secret

2007-11-03 Thread Carl Karsten
birkin wrote: > This issue of how to best organize private and local django settings > came up at a recent hackfest I attended. Some googling revealed > postings by Adrian and others that essentially noted that it's > reasonable to assume that different programmers will choose to handle > this dif

Re: Is it possible to debug a view using breakpoints in Eclipse?

2007-11-03 Thread crybaby
I have the same problem, breakpoint is not working when you set it inside eclipse and call the urls from the browser. This is how I have my setup: c:c:\my_web_projects\mysite <- this folder contains the stuff like manage.py, settings, apps folder for each apps My breakpoint and watching variab

Re: GeoDjango

2007-11-03 Thread Jeffrey Johnson
Why is there no list specific to GeoDjango? ... I am sure the rest of the general Djangonauts don't need to see discussions about Projectsions, EPSG codes and the like ;) Can we just set one up on google groups? Jeff On 11/3/07, tlp <[EMAIL PROTECTED]> wrote: > > You can post to list and put Geo

Re: keeping SECRET_KEY secret

2007-11-03 Thread birkin
This issue of how to best organize private and local django settings came up at a recent hackfest I attended. Some googling revealed postings by Adrian and others that essentially noted that it's reasonable to assume that different programmers will choose to handle this differently, and, as Malcol

Re: GeoDjango

2007-11-03 Thread tlp
You can post to list and put GeoDjango in the subject line. - Travis On Nov 3, 9:17 am, "Jeffrey Johnson" <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > Is there a specific group or list for users of GeoDjango. We just > started an implementation, and I want to know where I can turn to for > hel

3 questions about user-defined Field types

2007-11-03 Thread Tim Chase
Using this section of the Master Class notes found here http://toys.jacobian.org/presentations/2007/oscon/tutorial/#s103 I've been working to create a custom field-type for consolidating some of my work that was previously duplicated across several models. The field-type in question is a "Parti

Re: Any Djangonauts in Berlin for the Web 2.0 Conference?

2007-11-03 Thread Horst Gutmann
I originally planed to go there, but O'Reilly conferences are simply too expensive so I had to reschedule my November :-/ On 11/2/07, RKnobelspies <[EMAIL PROTECTED]> wrote: > > If there´s interest i could offer to arrange a Django meet-up next > week alongside the conference schedule. Feel free

Admin logout fails in r6447

2007-11-03 Thread Dokter Bob
Dear people, After upgrading our Django distribution we found that it seems inpossible to log out of the admin interface. Are we the only ones experiencing this problem? Should I file a bug? If you have any questions regarding our setup please ask. Thanks, Dokter Bob --~--~-~--~~-

Reloading only one Python interpreter with Apache

2007-11-03 Thread Sander Dijkhuis
On our Apache server, we're hosting multiple Django projects. The Apache configuration is like this: PythonAutoReload Off ServerName first.example.com SetHandler python-program SetEnv DJANGO_SETTINGS_MODULE first.settings PythonInterpreter first

Multiple file uploads

2007-11-03 Thread scompt
Hello everybody, I whipped up a new widget/field pair to allow a user to upload multiple files in one shot using newforms. It also allows the user to add more file input boxes if more files need to be uploaded. I've written more about it on my blog [1]. It's a first attempt, so I'd love some f

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread omat
I have experimented both with the subject and the message. They both expose the same problem when the name contains non-ascii chars. As a hack, I started using the slug field instead of the name field both in the message template and the subject and it works fine, but the problem is still there.

Brigitta Bulgari free video clips. Movie gallery

2007-11-03 Thread julpa
. . . .Brigitta Bulgari free video clips. Movie gallery . . . .Brigitta Bulgari scene 1 . . http://lika.quotaless.com/video1.html . . . .Brigitta Bulgari scene 2 . . http://lika.

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Karen Tracey
On 11/3/07, omat <[EMAIL PROTECTED]> wrote: > > > Here is the traceback: [snip] So, it is during the rendering of the template that things go kerflooey: File "/srv/django/sites/haberrobotu/aggregator/models.py", line 199, > in mail_new_tag > msg = t.render(c) ...in which case the conte

GeoDjango

2007-11-03 Thread Jeffrey Johnson
Hi Everyone, Is there a specific group or list for users of GeoDjango. We just started an implementation, and I want to know where I can turn to for help and/or help others out. Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Newforms validation error not displayed:

2007-11-03 Thread Karen Tracey
On 11/3/07, crybaby <[EMAIL PROTECTED]> wrote: > > > Validation checks the number entered by the user is between the range > and this check is done in "def clean_guess_the_number". This is not > working. > > Seems like "def clean_guess_the_number(self)" never executed when you > post the data and

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread omat
Typo: "str" in "isinstance(str, unicode)" should be "sbj" On 3 Kasım, 15:13, omat <[EMAIL PROTECTED]> wrote: > Here is the traceback: > > Traceback (most recent call last): > File "update_feeds.py", line 171, in process_feed > process_entry(entry, fpf, feed, postdict) > File "update_fee

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread omat
Here is the traceback: Traceback (most recent call last): File "update_feeds.py", line 171, in process_feed process_entry(entry, fpf, feed, postdict) File "update_feeds.py", line 119, in process_entry feed.tags)) File "/srv/django/common/tagging/managers.py", line 39, in update_tags

Newforms validation error not displayed:

2007-11-03 Thread crybaby
Validation checks the number entered by the user is between the range and this check is done in "def clean_guess_the_number". This is not working. Seems like "def clean_guess_the_number(self)" never executed when you post the data and when form.is_valid() called. class GuessForm(forms.Form):

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 07:01 -0500, James Bennett wrote: > On 11/3/07, omat <[EMAIL PROTECTED]> wrote: > > sbj = u'new tag: %s' % (instance.name) > > You might want to read this: > > http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist > > There's a warning a

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 11:41 +, omat wrote: > Hi All, > > I have a function that sends mail to managers every time a new tag is > created, connected to post_save of a Tag model via dispatcher. > > def mail_new_tag(instance): > t = loader.get_template('app/new_tag_email.txt') > c = Con

Re: encoding problem in instance signal / dispatcher?

2007-11-03 Thread James Bennett
On 11/3/07, omat <[EMAIL PROTECTED]> wrote: > sbj = u'new tag: %s' % (instance.name) You might want to read this: http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist There's a warning about using this style of string interpolation under Python 2.3 which may

encoding problem in instance signal / dispatcher?

2007-11-03 Thread omat
Hi All, I have a function that sends mail to managers every time a new tag is created, connected to post_save of a Tag model via dispatcher. def mail_new_tag(instance): t = loader.get_template('app/new_tag_email.txt') c = Context({'tag': instance}) msg = t.render(c) sbj = u'new t

Re: how to select current user's object in the forms.py,thanks!

2007-11-03 Thread Malcolm Tredinnick
On Sat, 2007-11-03 at 03:55 -0700, [EMAIL PROTECTED] wrote: > i want to filter some object related to current logined user in > forms.py, the key code is: > choices = [(str(x.id), x.name) for x in > Category.objects.filter(user__id__exact=request.user.id)] > > but i got this error: > Exception T

how to select current user's object in the forms.py,thanks!

2007-11-03 Thread [EMAIL PROTECTED]
i want to filter some object related to current logined user in forms.py, the key code is: choices = [(str(x.id), x.name) for x in Category.objects.filter(user__id__exact=request.user.id)] but i got this error: Exception Type: NameError Exception Value:global name 'request' is no

Re: Is there a simpler solution?

2007-11-03 Thread Akaroa
RajeshD wrote: > > On Nov 2, 4:05 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I am sure there is something absolutely simple, but I guess I am missing it. >> I need to display some content/ news articles over 3 columns on a home page, >> where the order is latest stories coming in

Re: Is there a simpler solution?

2007-11-03 Thread Ramdas S
Thanks, I shall try this Ramdas On 11/3/07, RajeshD <[EMAIL PROTECTED]> wrote: > > > Disregard the overflow:hidden piece in my CSS above. It's not needed: > > > .article {width:32%;float:left;} > .clear_all {clear:both;} > > > > > --~--~-~--~~~---~--~~ You receiv

Design Contest by NASA...

2007-11-03 Thread Designer
Hi, Please click the link to find the concept for Earthquake resistant building... http://www.createthefuturecontest.com/pages/view/entriesdetail.html?entryID=533 Thanks Anand --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go