Re: Django - Forms Widget TypeChoiceField - how to set id for two radio buttons

2011-12-26 Thread Timothy Makobu
Try this: widget=forms.RadioSelect(renderer=HorizRadioRenderer, attrs={"id":"whatever_you_want"}) On Tue, Dec 27, 2011 at 3:08 AM, Mengu wrote: > hi luke, > > instead of setting auto_id to False, you should give it a string > parameter. please read more on > > https://docs.djangoproject.com/en

Re: Query with no-correspondence results

2011-12-26 Thread Python_Junkie
I have not read all 18 responses, so if I am off base I apologize. I believe that you want to avg the votes (by gender) of each unique combination of thing and context. (First take gender out of the equation) In order to be able to get the avg votes for the combination of potatoes and flavor as c

Re: Query with no-correspondence results

2011-12-26 Thread wgis
Sorry for digging this up but I have a more complex funcionality to implement and I was hoping you could help I had mydatabase_votecontext (id, name) (1, Flavour) (2, Smell) (3, Usability) (4, Size) mydatabase_vote (id, thing, context, user, vote) (1, Potatoes, Flavour, Me, 2.0) (2, Potatoes, Sm

Re: compiling python files in django

2011-12-26 Thread Python_Junkie
I assume that you are performing these functions in a view. I would test the value grn=submit['grnvalue']) by rendering this to a template and see what 'gm' spits out. This way you will find out what is sitting in the variable On Dec 26, 4:33 am, Mohammad Shahid Siddiqui wrote: > Hi, > > I have

Re: Django - Forms Widget TypeChoiceField - how to set id for two radio buttons

2011-12-26 Thread Mengu
hi luke, instead of setting auto_id to False, you should give it a string parameter. please read more on https://docs.djangoproject.com/en/dev/ref/forms/api/#ref-forms-api-configuring-label. all the best. On 26 Aralık, 21:45, luke lukes wrote: > hi everyone. i'm using a form with a TypeChoiceFi

Django - Forms Widget TypeChoiceField - how to set id for two radio buttons

2011-12-26 Thread luke lukes
hi everyone. i'm using a form with a TypeChoiceField, this is the form code: http://pastebin.com/GHttrDyN. now i'm trying to set a custom id for the two radio buttons displayed but i havent found yet the right way. maybe it's possible set it during form instantiation (as i set auto_id=False) in the

Re: Is Django deleting my python objects?

2011-12-26 Thread devbird
I found out that using another field, as "slug" instead of "id", so that "dictionary[instance.id] = some_value" becomes "dictionary[instance.slug] = some_value", the behaviour is different: the dictionary isn't affected when the object is deleted. Is not instance.id a simple integer then? Seems it

Re: Is Django deleting my python objects?

2011-12-26 Thread devbird
It's very awkward: there's no strict relation between the dictionary keys and the deleted objects, but the keys are deleted together with the objects. I found where it happens: it's between the pre_delete and the post_delete send in the django.models.deletion.Collector delete() method, still I can'

Re: Is Django deleting my python objects?

2011-12-26 Thread devbird
I'm running tests. And I don't have any post_delete or pre_delete signal handler defined. On Dec 26, 6:02 pm, Javier Guerra Giraldez wrote: > On Mon, Dec 26, 2011 at 11:09 AM, devbird wrote: > > dictionary > > is the attribute of a singleton object. It lives as long as the server > > instance i

Re: Is Django deleting my python objects?

2011-12-26 Thread Javier Guerra Giraldez
On Mon, Dec 26, 2011 at 11:09 AM, devbird wrote: > dictionary > is the attribute of a singleton object. It lives as long as the server > instance is up. > > How could it be possible? are you running a single instance of your django process? the development server does; but any non-toy deployment

Re: Is Django deleting my python objects?

2011-12-26 Thread Andre Terra
You have inconsistent imports so that your signal is being called more than once. By inconsistent I mean "from myapp.models import foo" and "from models import foo" in different areas of your app/project. Cheers, AT On Mon, Dec 26, 2011 at 2:09 PM, devbird wrote: > I've a post_save handler me

Is Django deleting my python objects?

2011-12-26 Thread devbird
I've a post_save handler method which stores values in a dictionary, like dictionary[instance.id] = some_value I was writing a post_delete handler to pop the value from the dictionary, when I found that the value had been already popped. I don't delete or pop the value anywhere else in the code.

Need new *pyc files

2011-12-26 Thread Mohammad Shahid Siddiqui
Hi, I have added one column in the table of mysql db using 'python manage.py syncdb' after deleting the table. Now from the home page, I am fetching the value of text area, and trying to put in the database. The value when written to flat file, is same as fetched, but when writing to database, it

When override default setting of TinyMCE, why can't get the value of textarea?

2011-12-26 Thread Tsung-Hsien
Hi, I refer the article,https://code.djangoproject.com/wiki/ AddWYSIWYGEditor, and create textareas.js to override default setting of TinyMCE. the textarea shows new functions while creating the textareas.js. However, when I submit the data, server can't save the data. if I don't override the setti

Need help in renaming template tags

2011-12-26 Thread CareerDhaba tech
Hey everyone, I am running into an issue where two third party apps easy_thumbnail and sorl_thumbnail are using the custom template tag called thumbnail. Hence, I am actually unable to use the tag at all. I would like to change it so that the template tag from sorl_thumbnail is renamed as sorl_thu

One column in table is not getting updated

2011-12-26 Thread Mohammad Shahid Siddiqui
Hi, I have added one column in the table of mysql db using 'python manage.py syncdb' after deleting the table. Now from the home page, I am fetching the value of text area, and trying to put in the database. The value when written to flat file, is same as fetched, but when writing to database, it

compiling python files in django

2011-12-26 Thread Mohammad Shahid Siddiqui
Hi, I have added one column in the table of mysql db using 'python manage.py syncdb' after deleting the table. Now from the home page, I am fetching the value of text area, and trying to put in the database. The value when written to flat file, is same as fetched, but when writing to database, it