Re: How to find the label for a value

2006-02-13 Thread PythonistL
Luke, Thanks for your reply.But I am not sure I fully understand your reply. (I might have put my question in a not clear way). All that I need is to render the user's choice so that in a template there is no value but the label. E.g. the new_data( taken from a form ) may be like this: {'Passwo

Re: How to find the label for a value

2006-02-13 Thread Malcolm Tredinnick
PythonistL wrote: > Luke, > Thanks for your reply.But I am not sure I fully understand your reply. > (I might have put my question in a not clear way). > All that I need is to render the user's choice so that in a template > there is no value but the label. > > E.g. the new_data( taken from a for

Re: Help with Admin and modpython

2006-02-13 Thread ChaosKCW
Is it possible the to have syntax error which works on windows on the local server, but is a syntax error on mod python ? I will take a look and see if I can spot anything, Thanks,

RE: How to find the label for a value

2006-02-13 Thread Leeuw van der, Tim
The choices for the form are specified in your model. Django uses these choices for it's form-display. It would make sense to me if Django would also provide an easy way for you to display such 'nice' values in your interface. The set of choices that you provide is accessible via the model; if yo

getting field's help_text in template?

2006-02-13 Thread Matthew Flanagan
how do I get a a fields help_text in a template when i'm accessing it via {{ form.myfield }}? thanks matthew

Re: Help with Admin and modpython

2006-02-13 Thread [EMAIL PROTECTED]
"ChaosKCW" <[EMAIL PROTECTED]> wrote: > Is it possible the to have syntax error which works on windows on the > local server, but is a syntax error on mod python ? have you checked that you're using the same Python version on both platforms ?

Re: How to find the label for a value

2006-02-13 Thread Amit Upadhyay
On 2/11/06, Luke Plant <[EMAIL PROTECTED]> wrote: On Saturday 11 February 2006 13:14, Luke Plant wrote:>   context['choices'] = CHOICES.items()Just remembered - this doesn't guarantee ordering, you'll need to handlesorting of the choices list somehow. http://aspn.activestate.com/ASPN/Cookbook/P

Re: How to find the label for a value

2006-02-13 Thread Amit Upadhyay
On 2/13/06, Leeuw van der, Tim <[EMAIL PROTECTED]> wrote: The choices for the form are specified in your model. Django uses thesechoices for it's form-display.It would make sense to me if Django would also provide an easy way foryou to display such 'nice' values in your interface. Django already do

RE: How to find the label for a value

2006-02-13 Thread Leeuw van der, Tim
Ok, that’s great – Is it possible to call this function without any arguments though, so that it can be used directly in templates? (I guess that yes; and in that case it looks like exactly what the OP (and me) want, provided that the OP indeed is displaying values from a Model)   Thanks!

Re: How to find the label for a value

2006-02-13 Thread [EMAIL PROTECTED]
Luke Plant wrote: > > context['choices'] = CHOICES.items() > > Just remembered - this doesn't guarantee ordering, you'll need to handle > sorting of the choices list somehow. the obvious way being CHOICES = ( (1, 'Choice 1'), (2, 'Choice 2'), ) context['choices'] = CHOICES try: cho

Re: url in Tinymce

2006-02-13 Thread Mary Adel
I found the solution and it is in textarea.js as u can set the url class their :) On Sun, 2006-02-12 at 16:00 +0200, Mary Adel wrote: > Dear All , > I can't change the colors of the url in Tinymce althoughi could change > the font and size and evrything can anyone help me how i could change > th

Re: relating ManyToMany to itself

2006-02-13 Thread Brice Carpentier
2006/2/11, Russell Keith-Magee <[EMAIL PROTECTED]>: > > On 2/6/06, Brice Carpentier <[EMAIL PROTECTED]> wrote: > > > > Hi, > > I've got an Article object (what a surprise !), and was willing to > > relate it to other articles > > My initial plan was to use a ManyToMany relationship, but it doesn't

Re: Model Basics

2006-02-13 Thread Brice Carpentier
2006/2/12, ChaosKCW <[EMAIL PROTECTED]>: > 1) can you access the session user object from the model _pre_save no see http://code.djangoproject.com/ticket/1268 though > 2) can you subclass a model. yes see the docs (either on www.djangoproject.com/documentation or the wiki on code.djangoproject.c

Re: Multiple Database & 1 Django

2006-02-13 Thread Siah
Russ, I see the priorities. I'm going to go ahead with a single db for now, hopefully by the time I launch it the feature is out and I would rework some of the necessary changes. Thanks, Sia

Re: memory usage

2006-02-13 Thread Arthur
Mod_python 3.2.7 has been released which fixes a few memory related bugs (see http://www.modpython.org/live/mod_python-3.2.7/doc-html/node97.html). Among it "Fixed Multiple/redundant interpreter creation problem." Some people using Django probably trigger some of those bugs. So if low memory consu

Dreamhost, Django and MySQL server connection

2006-02-13 Thread Edgars Jekabsons
Does anyone else who uses Dreamhost has problems with MySQL connection going away? The project I suggested hosting there is not even inproduction yet, but we get MySQL server errorsa lot (a few times a day). Sometimes it's just Django error 500, but other times I get a Python traceback screen

Re: recursive template calls

2006-02-13 Thread Shannon -jj Behrens
On 2/11/06, Robert Wittams <[EMAIL PROTECTED]> wrote: > > Shannon -jj Behrens wrote: > >> You don't *need* recursion on templates for threaded messages like > >>your example app, that's exactly the point :) > > > > > > Julio, with all due respect for your programming prowess, I *like* > > recursi

Re: Dreamhost, Django and MySQL server connection

2006-02-13 Thread Jamison Roberts
I have nothing but problems with Dreamhost + Django.  More specifically Dreamhost + Python.  I hate that company and will be switching as soon as my year is up.Can I threadjack and ask for a host recommendation? On 2/13/06, Edgars Jekabsons <[EMAIL PROTECTED]> wrote: Does anyone else who uses Dream

Re: recursive template calls

2006-02-13 Thread Jonathan Ellis
On 2/13/06, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote: I think it's unfortunately that template writers have to resort toPython just to package up a bit of HTML into a function, but that'sjust my opinion. OTOH Python is a lot cleaner than attempts at "designer-friendly" mini-languages.  (CFScri

Re: Dreamhost, Django and MySQL server connection

2006-02-13 Thread foot
We've got our django project hosted over at Site5 and we have a similar MySQL problem: A (2006, MySQL server has gone away) error, whenever the site hasn't been accessed in a while. It seems to be related to your mysql interactive timeout setting. There's a bit of a general discussion about this p

more model basics - mny to many's

2006-02-13 Thread gizo
Hiya. I am not a web developer, okay, just trying to do a band website (so take it easy on me, please ;) I am having trouble with my models. I have the following: class musician(meta.Model): ... class instrument(meta.Model): ... class song(meta.Model): .. class songInstrument(m