newforms: How to make a Checkboxed user select list...

2007-06-25 Thread Jens Diemer
I would like to make a newforms user select list, from every existing django users, looks like this: -- username1 - mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]

Re: no newforms.TextField() available?!?!?

2007-06-25 Thread Jens Diemer
James Bennett schrieb: > On 6/25/07, Jens Diemer <[EMAIL PROTECTED]> wrote: >> This works: >> mail_text = forms.CharField(widget=forms.Textarea) > > That's by design. Whether to show an input type="text" or a textarea > is a matter of widgets, so you differentiate between them by using > dif

python manage.py startapp freepostcards

2007-06-25 Thread Kelvin Nicholson
Dear Djangoers: I have thoroughly enjoyed the last few months on this list, yet I must take a temporary leave. Starting on the 30th I'm heading for a tour around SE Asia -- Hong Kong, China, Tibet, Laos, Cambodia and Vietnam. Eventually I will end up in Sydney. So why am I making this public?

Re: CachedDnsName - very slow under apache/mod_python ...

2007-06-25 Thread Graham Dumpleton
On Jun 26, 12:55 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-06-25 at 19:39 -0700, ZebZiggle wrote: > > Howdy! > > > Emails were taking 15s to send each. Upon investigation it came down > > to CachedDnsName in django.core.mail. Specifically, the > > socket.getfqdn() call. Also

Re: MySQLdb problem

2007-06-25 Thread Silhyon
This solution would work if the version of Python I had installed was 2.4, unfortunately I am on 2.5 does not have a binary package for 2.5 and it seems that a work around is not around. I am wondering if I can just uninstall 2.5 and install 2.4 and go from there. Thanks for trying to put me on th

Re: CachedDnsName - very slow under apache/mod_python ...

2007-06-25 Thread ZebZiggle
On Jun 25, 11:55 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > (for example, a setting for the fqdn so that we don't even do the lookup > if the setting exists). I like that idea. I should be able to just set DNS_NAME myself from the calling module. Let me investigate. Thx guys, Sandy -

Re: list_filter in newforms-admin doesn't worj

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 16:10 +, abe wrote: > > I'm using the newforms-admin branch, and have specified > some admin options for a Experiment model like this > > > class ExperimentalDataOptions(admin.ModelAdmin): > list_display = > ('project_name','experiment_nr','experiment_date','short_

Re: Forms and formating error messages

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 08:22 -0700, AnaReis wrote: > Hi, > I was trying to change the way in which the errors are presented in a > form. > I tried to put them in: > {{field.label}}:{{field}}{% if > field.field.required %}*{%endif%} td>{%if field.errors%}{{field.errors}} span>{%endif%} > but I still

Re: CachedDnsName - very slow under apache/mod_python ...

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 19:39 -0700, ZebZiggle wrote: > Howdy! > > Emails were taking 15s to send each. Upon investigation it came down > to CachedDnsName in django.core.mail. Specifically, the > socket.getfqdn() call. Also, it *always* happened, not just on > startup. So it seems the call was timi

Re: CachedDnsName - very slow under apache/mod_python ...

2007-06-25 Thread SmileyChris
I'm not sure. Each Apache instance may have to populate this, so it could be noticed several times. Keep investigating! Thinking more about it, perhaps CachedDnsName should only lazily loaded if settings.DEBUG==True. It's not really fair to expect an end user to have to wait for this timeout jus

CachedDnsName - very slow under apache/mod_python ...

2007-06-25 Thread ZebZiggle
Howdy! Emails were taking 15s to send each. Upon investigation it came down to CachedDnsName in django.core.mail. Specifically, the socket.getfqdn() call. Also, it *always* happened, not just on startup. So it seems the call was timing out and the cache wasn't effective. The strange part is, it

Tests fail on redirects when admin urls enabled

2007-06-25 Thread Rand Bradley
I recently enabled the admin module on a project I am working on, and some (formerly) passing tests began erroring when testing redirects. Here is the exception traceback from a failing test: Traceback (most recent call last): File "E:\dev\seo\src\seo\sm\tests.py", line 135, in test_seeking_Cit

Re: multiple databases

2007-06-25 Thread [EMAIL PROTECTED]
Ben Ford is working on merging in changes from the trunk in with the branch... at this time neither he or myself ( I had planned on doing this but found he was farther ahead of me ) have commit permissions to the project... but hopefully if he gets finished with it..and we can test it out... someo

Re: database error instead of 400

2007-06-25 Thread Ramiro Morales
On 6/25/07, Francis Lavoie <[EMAIL PROTECTED]> wrote: > > I have a problem with my 400.html when I put the site in production > (another server). > > Both desktop and server are running ubuntu 7.04. > The Desktop use the builtin webserver and the server is running apache with > mod_python > >

Re: Newforms, MultiSelect, "Hold Down Control" message.

2007-06-25 Thread Matt McClanahan
On Jun 25, 1:03 pm, larry <[EMAIL PROTECTED]> wrote: > I've derived a new version of the CheckboxSelectMultiple widget. > Unfortunately, just like its parent, it prints a message "Hold down > "Control", or "Command" on a Mac, to select more than one." on each > field. This instruction, which I

database error instead of 400

2007-06-25 Thread Francis Lavoie
I have a problem with my 400.html when I put the site in production (another server). Both desktop and server are running ubuntu 7.04. The Desktop use the builtin webserver and the server is running apache with mod_python On my localhost with debug = True and debug = False, everything is working

Forms and formating error messages

2007-06-25 Thread AnaReis
Hi, I was trying to change the way in which the errors are presented in a form. I tried to put them in: {{field.label}}:{{field}}{% if field.field.required %}*{%endif%}{%if field.errors%}{{field.errors}}{%endif%} but I still get them formatted as an and I would like the errors to appear as simple

Re: How to translate this SQL (nearest 20) into Django?

2007-06-25 Thread Jeremy Dunck
On 6/25/07, Tim Tsai <[EMAIL PROTECTED]> wrote: ... > sqlite> select position_payrate, position_payrate - 2 as diff, > abs(position_payrate - 2) as adiff from positions order by adiff asc > limit 20; > 2|0|0 ... http://www.djangoproject.com/documentation/db-api/#extra-select-none-wher

How to translate this SQL (nearest 20) into Django?

2007-06-25 Thread Tim Tsai
Given the corresponding query and output, what would be the best way to translate that into Django? I've looked at QuerySet, filter, etc. but can't quite figure out the best way to do this. The idea is to find the nearest 20 rows that matches, of course. The 2 will be passed via URL (i.e

Re: Meta class preventing table add

2007-06-25 Thread Brian Rosner
On 2007-06-25 14:10:30 -0600, Charles Wesley <[EMAIL PROTECTED]> said: > > Hello, > > I'm a Django newbie, and I'm trying to set up a model that includes > the following table: > > class Team(models.Model): > school = models.ForeignKey(School, > unique_for_year="season_start_date") > s

list_filter in newforms-admin doesn't worj

2007-06-25 Thread abe
I'm using the newforms-admin branch, and have specified some admin options for a Experiment model like this class ExperimentalDataOptions(admin.ModelAdmin): list_display = ('project_name','experiment_nr','experiment_date','short_title') search_fields = ('experiment_nr','project_name','e

Meta class preventing table add

2007-06-25 Thread Charles Wesley
Hello, I'm a Django newbie, and I'm trying to set up a model that includes the following table: class Team(models.Model): school = models.ForeignKey(School, unique_for_year="season_start_date") season_start_date = models.DateField() division = models.ForeignKey(Division) coach_fi

Newforms, MultiSelect, "Hold Down Control" message.

2007-06-25 Thread larry
I've derived a new version of the CheckboxSelectMultiple widget. Unfortunately, just like its parent, it prints a message "Hold down "Control", or "Command" on a Mac, to select more than one." on each field. This instruction, which I assume is coming from an ancestor class, is not appropriate fo

Re: multiple databases

2007-06-25 Thread Jeremy Dunck
On 6/25/07, grassoalvaro <[EMAIL PROTECTED]> wrote: > > Anyone? That was greate idea but i see that last update was long time > ago... i need multiple databases in my project so if anyone know > anything about this (maybe own solutions in this area?) please inform > me. > No one is working on it

Re: multiple databases

2007-06-25 Thread grassoalvaro
Anyone? That was greate idea but i see that last update was long time ago... i need multiple databases in my project so if anyone know anything about this (maybe own solutions in this area?) please inform me. On Jun 24, 6:14 pm, grassoalvaro <[EMAIL PROTECTED]> wrote: > Is that project dead or ma

Unittests and coverage

2007-06-25 Thread Michal
Hello, I try to write test together with coverage [1]. This tool could tell me, which lines of code was or wasn't executed and therefore tell, how my tests are (or aren't) "superior". I put initial code for coverage into setUp, and cleanup to tearDown method of Testcase class. Problem is, that

Re: ANN: Django-fr.org is out!

2007-06-25 Thread Jeremy Dunck
On 6/25/07, Jorge Gajon <[EMAIL PROTECTED]> wrote: > > > Se dice "red" Gracias, Jorge. :) --~--~-~--~~~---~--~~ 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@goog

Re: Apache auth

2007-06-25 Thread David Reynolds
Sean, On 24 Jun 2007, at 4:13 pm, Sean Mc Allister wrote: What I'm currently using: Server Version: Apache/2.2.3 (Ubuntu) DAV/2 mod_python/3.2.10 Python/2.5.1 Damn! I was hoping it would be drastically newer than what I was using and I could blame old versions of mod_python or something.

Newforms, widgets, adding new fk values on the fly.

2007-06-25 Thread larry
The admin site offers the ability, when setting values for FK or MTM fields, to add a value on the fly. I've built a custom descendant of the CheckboxSelectMultiple widget (which displays the check boxes in a table, not a list, and allows a user-defined number of columns). I'd like to extend thi

Re: Empty urls.py file and {% url %} tags

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 21:43 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-06-25 at 10:06 +, Ryan Kanno wrote: > > I know this isn't big (and maybe it's by design), but this didn't > > happen prior to I believe -r 5516. If you have a empty urls.py > > include file in any app within the proje

Send a filter-pipline output to a template tag

2007-06-25 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, is it possible, to send a output, generated by a filter pipeline chain to a template tag? I want to split a page's tag, that is already processed by the reStructuredText filter and a link generation filter, in several subtexts to mix it

Re: ANN: Django-fr.org is out!

2007-06-25 Thread Jorge Gajon
On 6/22/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > Dice que estas en #django-es en freenode o un otra network? Estoy en > #django-es ahora. > > (Como se dice "network"?) > Se dice "red" Saludos! --~--~-~--~~~---~--~~ You received this message because you ar

Re: newforms view-question

2007-06-25 Thread patrick k.
I do agree. helper methods for every special case is not the solution. on the other hand, it´s just not clear sometimes how things could/ should be done. I´d just wish for more "best practice" advice and more complex examples (esp. in the docs). regards, patrick Am 25.06.2007 um 16:51 schrieb

Re: Problem with query over relationships and the FOO_set Manager

2007-06-25 Thread ilDave
I tried your second solution and it works fine! Thanks! On Jun 25, 4:51 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > d = Details.objects.filter(creation_date__gte=datetime.date(2007, 06, > > 01)) > > d = d.header_set.filter(code__exact='123', author__exact='dave') > > > but I get an > > Attrib

Re: Problem with query over relationships and the FOO_set Manager

2007-06-25 Thread Tim Chase
Whoops...though I hate responding to my own post, I got things backwards somehow (swapping details and headers). Your Details have the header attribute so you want since = datetime.date(2007,6,1) details = Details.objects.filter( code='123', author='dave', header__cre

Re: Problem with query over relationships and the FOO_set Manager

2007-06-25 Thread James Bennett
On 6/25/07, ilDave <[EMAIL PROTECTED]> wrote: > So, I looked in the documentation and I found the 'FOO_set' Manager, > and I tried something like this: > > d = Details.objects.filter(creation_date__gte=datetime.date(2007, 06, > 01)) > d = d.header_set.filter(code__exact='123', author__exact='dave'

Re: newforms view-question

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 16:41 +0200, patrick k. wrote: > thanks malcolm. > > get_initial_data should be defined in the form, I think. because the > form doesn´t necessarily relate to a model, so the model is probably > the wrong place. > I´m a bit surprised that this isn´t easier/cleaner with n

Re: Problem with query over relationships and the FOO_set Manager

2007-06-25 Thread Tim Chase
> d = Details.objects.filter(creation_date__gte=datetime.date(2007, 06, > 01)) > d = d.header_set.filter(code__exact='123', author__exact='dave') > > but I get an > AttributeError: 'QuerySet' object has no attribute 'header_set' The results (which you store in "d") are a QuerySet which is a col

Re: newforms view-question

2007-06-25 Thread patrick k.
thanks malcolm. get_initial_data should be defined in the form, I think. because the form doesn´t necessarily relate to a model, so the model is probably the wrong place. I´m a bit surprised that this isn´t easier/cleaner with newforms. nevertheless, looks a bit better now: def do_save(form

Problem with query over relationships and the FOO_set Manager

2007-06-25 Thread ilDave
In my app I have two models like this: class Header(models.Model): code = models.CharField() author = models.CharField() class Detail(models.Model) header = models.ForeignKey(Header) creation_date = models.DateTime() I need to find all the Header objects with a certain code, a c

Re: looking for calender and a message board

2007-06-25 Thread [EMAIL PROTECTED]
I'm using a hacked-up version of myghtyboard for http://gretschpages.com/forum. I had a pretty workable calendar app at one point but killed it off. Wasn't that complex. On Jun 24, 3:40 am, "Justin Lilly" <[EMAIL PROTECTED]> wrote: > errr.. sorry. misclicked. You can find the source under the

Re: newforms view-question

2007-06-25 Thread Malcolm Tredinnick
Hi Patrick, On Mon, 2007-06-25 at 15:50 +0200, patrickk wrote: > here´s my view (I think the form-class is not so important for my > question): > > if request.method == 'POST': > form = UserProfileForm(request.POST) > if form.is_valid(): > # SAVING >

Courage

2007-06-25 Thread purtybird0
Living in the Hell my own people allowed the Illuminati to build for me. Courage is a strange thing, sometimes people say you don't have it when you do . Other times absolute fear enables one to change reality by manipulating the matter around them. In my experience, when this happens one has n

Courage

2007-06-25 Thread purtybird0
Living in the Hell my own people allowed the Illuminati to build for me. Courage is a strange thing, sometimes people say you don't have it when you do . Other times absolute fear enables one to change reality by manipulating the matter around them. In my experience, when this happens one has n

Re: using recaptcha with django's contrib comments module

2007-06-25 Thread Eric St-Jean
Hi, Aidas Bendoraitis a écrit : > You can do that by writing a wrapper for the > django.contrib.comments.views.comments.post_free_comment view. It > should take the request as an argument, check the validity of the > captcha, add the additional parameter to the request, call > the post_free_commen

Courage

2007-06-25 Thread purtybird0
Living in the Hell my own people allowed the Illuminati to build for me. Courage is a strange thing, sometimes people say you don't have it when you do . Other times absolute fear enables one to change reality by manipulating the matter around them. In my experience, when this happens one has n

newforms view-question

2007-06-25 Thread patrickk
here´s my view (I think the form-class is not so important for my question): if request.method == 'POST': form = UserProfileForm(request.POST) if form.is_valid(): # SAVING user_profile.sex = form.cleaned_data['sex'] user_profile.date

Re: no newforms.TextField() available?!?!?

2007-06-25 Thread James Bennett
On 6/25/07, Jens Diemer <[EMAIL PROTECTED]> wrote: > This works: > mail_text = forms.CharField(widget=forms.Textarea) That's by design. Whether to show an input type="text" or a textarea is a matter of widgets, so you differentiate between them by using different widgets. -- "Bureaucrat Co

Re: Introducing DjangoSites.Org

2007-06-25 Thread James Bennett
On 6/25/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > wasnt in spam either - seems to have got eaten up somewhere on the > way - I noticed djangosnippets also had this problem at the start ... > maybe you should consult james bennet On average, I get three or four emails bounced back at me e

Re: Introducing DjangoSites.Org

2007-06-25 Thread Kenneth Gonsalves
On 25-Jun-07, at 5:45 AM, Ross Poulton wrote: > On Jun 21, 12:52 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: >> i had registered as 'lawgon' and waited several hours - but no mail. >> Can you check out? > > As you'd noticed, I've verified your account. According to the mail > logs the mail

no newforms.TextField() available?!?!?

2007-06-25 Thread Jens Diemer
I would like to use the newforms.TextField() to make a html textarea. But i get the error: 'module' object has no attribute 'TextField' I wounder, because in the Docu i find TextField unter field types list: http://www.djangoproject.com/documentation/newforms/#field-types my co

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
It works!! Thanks again! I don't know what I would do without this Django users group! :D Ana --~--~-~--~~~---~--~~ 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@

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread EL AATIFI Sidi Mohamed
AnaReis wrote: > Well none of the previous solutions works... :( > I tried the "if field.required" and the "if > field.formfield.is_required" (this particular solution probably > doesn't work because I'm using the newforms). > and I put required=True on the required forms... :S > Excuse me I mi

How can I group fields in admin view of edit_inline foreign models?

2007-06-25 Thread Nash
How can I group fields in admin view of edit_inline foreign models? The fields tuple in admin takes fields; can I specify foreign models which have edit_inline in them? Thanks for your help as always --~--~-~--~~~---~--~~ You received this message because you ar

need help to define models.py for a survey app?

2007-06-25 Thread yml
Hello Djangonauts, I am creating a new application to support the creation of online poll (survey). The goals for this application is to support both: -a> The creation of the survey performed by the technical writers -b> Store the answers given by the interviewees The first aspect is simil

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
Well none of the previous solutions works... :( I tried the "if field.required" and the "if field.formfield.is_required" (this particular solution probably doesn't work because I'm using the newforms). and I put required=True on the required forms... :S --~--~-~--~~~-

Re: 'module' object has no attribute 'urlpatterns'

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 12:51 +0100, Derek Hoy wrote: > Meant to add that this was definitely something in r5516 - it appeared > consistently going between r5515 and r5516. > > sorry haven't had time to poke about at the cause- got a demo of the > project this afternoon :) > If I can help track it

Re: 'module' object has no attribute 'urlpatterns'

2007-06-25 Thread Derek Hoy
Meant to add that this was definitely something in r5516 - it appeared consistently going between r5515 and r5516. sorry haven't had time to poke about at the cause- got a demo of the project this afternoon :) If I can help track it down, let me know. Derek --~--~-~--~~

Re: 'module' object has no attribute 'urlpatterns'

2007-06-25 Thread Derek Hoy
On 6/24/07, brian corrigan <[EMAIL PROTECTED]> wrote: > > Hi Malcom, > > Thanks for getting back to me so quickly. Updatting to r5520 has fixed > my problem. Good work on you fix so :) Fixed here too. I'm on fcgi + lighttpd and was just getting a 500 server error on any URL in the project, inclu

Re: Empty urls.py file and {% url %} tags

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 10:06 +, Ryan Kanno wrote: > I know this isn't big (and maybe it's by design), but this didn't > happen prior to I believe -r 5516. If you have a empty urls.py > include file in any app within the project, it causes the {% url %} > tag to not resolve for any app, even an

REAL PLAYER is FREE and is considered the Best,Music Player Available Today !!

2007-06-25 Thread niku
Hi There, Real Player Update !! Now Real Player New Version is available for FREE. With Real Player, Transfer music to iPod and other portable media players.. www.chulbul.com/real.htm Have Fun --~--~-~--~~~---~--~~ You received this message because you are

REAL PLAYER is FREE and is considered the Best,Music Player Available Today !!

2007-06-25 Thread niku
Hi There, Real Player Update !! Now Real Player New Version is available for FREE. With Real Player, Transfer music to iPod and other portable media players.. www.chulbul.com/real.htm Have Fun --~--~-~--~~~---~--~~ You received this message because you are

Re: Introducing DjangoSites.Org

2007-06-25 Thread Kai Kuehne
Hi, On 6/25/07, wathi <[EMAIL PROTECTED]> wrote: > Hi Kai, > [...] > font-sizes are already relative and i am not going to change anything > for now. as this is not a django related problem or a feature request > for djangosites.org and no one else has complained about this i would > set up a tes

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread Aidas Bendoraitis
For the oldforms, it should be like this: {%for field in form%} {{ field.label }} {{ field }}{%if field.formfield.is_required %}*{%endif%} {%endfor%} tag is deprecated. DO NOT use it. Use CSS. Regards, Aidas Bendoraitis aka Archatas On 6/25/07, EL AATIFI Sidi Mohamed

Re: using recaptcha with django's contrib comments module

2007-06-25 Thread Aidas Bendoraitis
You can do that by writing a wrapper for the django.contrib.comments.views.comments.post_free_comment view. It should take the request as an argument, check the validity of the captcha, add the additional parameter to the request, call the post_free_comment passing the request to it, and return it

Re: Attrs in models

2007-06-25 Thread l5x
If it is by design - it is ok. I thought that I just can't find information *how* to do it. Thanks for your time & effort. On Jun 25, 3:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-06-24 at 22:49 +, l5x wrote: > > This is a great stuff and I'm really glad that you show

Empty urls.py file and {% url %} tags

2007-06-25 Thread Ryan Kanno
I know this isn't big (and maybe it's by design), but this didn't happen prior to I believe -r 5516. If you have a empty urls.py include file in any app within the project, it causes the {% url %} tag to not resolve for any app, even an unrelated app view. The exception returned is somewhere nea

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread EL AATIFI Sidi Mohamed
AnaReis wrote: > Hi! > I have this form where I want to put red asterisks after each required > field, but I can't find a way to do it... > This is my template code: > > onSubmit="return" > > > {%for field in form%} > {{field.label}}{{field}}{%if something_goes_here > %}*{%endi

How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
Hi! I have this form where I want to put red asterisks after each required field, but I can't find a way to do it... This is my template code: {%for field in form%} {{field.label}}{{field}}{%if something_goes_here %}*{%endif%} {%endfor%} My pr

Re: Javascript-Django image paths

2007-06-25 Thread robo
> I don't mean to offend you, but I think you've misunderstood how the > web works. There's really no difference in the HTTP request of a > human clicking a link and the HTTP request caused by an image tag (or > javascript image.src assignment). I thought that way because I couldn't find any ot