Urlresolvers issue ... side effect of named URL patterns ?

2007-07-09 Thread xgdlm
Hello all, I just sync my django with the latest SVN version to try the Unicode branch. Previously I was running Django 0.96pre. I have now an issue with reverse url. Here is for exemple my urls.py urlpatterns = patterns('', (r'member/status(?P\d+)/(?P\d+)/$', 'app.views_admin.member_li

Re: MultiWidget, DateField and form.is_valid() problem

2007-07-03 Thread xgdlm
On 4 juil, 04:45, xgdlm <[EMAIL PROTECTED]> wrote: > Is there someting special to do before "cleaning" the form with > MultiWidget based fields ? The answer is ... ... implementing a custom value_from_datadict method for the class DropDownDateWi

MultiWidget, DateField and form.is_valid() problem

2007-07-03 Thread xgdlm
Hello all, I have a trouble with newforms lib and MultiWidget. I created a custom MultiWidget based on SplitDateTimeWidget. The problem is that when I run the form.is_valid() The value send to the DateField clean method is a list ['1', '1', '2000']. Then the strptime command in this function fai

Re: Help with limit_choices_to

2007-05-15 Thread xgdlm
> At the moment, the easiest way I see to to that is to include a JS > file that will catch the current member_id, then call an external page > that will return a JSON string of > "Folder.objects.filter(member=member) " query_set and then build the > wished multiselected box .. I'll try that way

Re: Help with limit_choices_to

2007-05-14 Thread xgdlm
Hello Thank you Malcolm for your fast answer (as usual) > However, you > cannot pass parameters to that function: it's mostly for use with things > like datetime.datetime.now -- where the result of the function does not > depend on "self" in any fashion. Hum, that what I understood, but now I

Help with limit_choices_to

2007-05-14 Thread xgdlm
Hello all ! I have trouble using limit_choices_to on the following modele. I searched the group and googled but I couldn't find the solution. Here is my modeles : - class Member(models.Model): login = models.CharField(maxlen

Re: new forms - processing the form without rebuilding the entire view

2007-04-14 Thread xgdlm
> However, I'm not sure of the best way to process the form for error > messages without rebuilding the complete view, which seems to be a lot > of overhead when you consider all the relevant queries that have to be > re-done. Multiple way to process this in my opinion : 1- cache the elements o

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread xgdlm
> > This week I decided to give a try to a new configuration. I'm now > > running django on lighttpd / fcgi and I have no swap at all. > > So I'm aware the mod_python is the prefered way to use django ... buy > > I'm quite happy with that new server configuration :) > > Can you give some more deta

Re: Long time process and FCGI

2007-03-30 Thread xgdlm
> I am just not sure about how to call the shell script. I would call the shell script withing a cronjob command : python /path/to/sendmail.py this script would do someting roughly like : - if there_is_a_mailing_to_send : for mail in mailtosend : do send mail - > read from a databa

Re: Long time process and FCGI

2007-03-30 Thread xgdlm
Hello, Sending email within a view seems to me quite a strange process :) You should send your emails within a shell python (or whatever) process. What I would do ... I would within my view, write some kind of data to a database or a text file or whatever. Then, have a cronjob that check that da

Re: Django/mod_python high memory usage - possible leak?

2007-03-30 Thread xgdlm
Hello, I've notice the same memory consuption on my servers. I'm running django appz on 3 LVS loadbalanced mod_python apache http servers. If, for instance, I do a maintnance on one of the server Swap is increasing a lot on the two remaining servers, even if those two servers should handle the tr

Re: UnicodeDecodeError with labels of choices (for newforms.ChoiceField with RadioSelect widget)

2007-02-23 Thread xgdlm
Hello All, It seems I'm facing the same problem or an equivalent problem. I'll try to use newforms , running python 2.4.3 >>> from django.newforms import * >>> from listing.models import Industry >>> w = SelectMultiple() >>> print w.render('xxx',None,((industrie.id,industrie.fr) for industrie in

Problem with a Class

2007-02-09 Thread xgdlm
Hello, I found this very interesting post : http://groups.google.com/group/django-users/browse_frm/thread/bb7f406bffd697f5 Then I tried to apply this modele to mine, but I have trouble ! Here is the class : # class Vi

CommaSeparatedIntegerField problem with two digit values

2006-10-30 Thread xgdlm
Hello all, I would like to have a Multiple Select box, render the chosen fields of a CommaSeparatedIntegerField. The CommaSeparatedIntegerField stores the ability of a user to move to a given area : -- Mobility = models.CommaSeparatedIntegerField(maxl

Re: increase size of a charfield

2006-10-25 Thread xgdlm
Hello, > a have a charfield of 255 chars in a model but on the form, it > consists of a smallish You can use models.TextField and maxlength to 255 to display it as a textarea. xav --~--~-~--~~~---~--~~ You received this message because you are subscribed to the