Re: how to use __init__ in a form (passing an extra variable to the form)

2014-10-17 Thread Carl Meyer
On 10/17/2014 01:36 AM, dk wrote: > took me a little bit to get the self.fields, since I was trying to > override directly as ratiooo.choices. Yeah, metaclasses are confusing :-) > and I move the django.setup() to the top of the file after the imports > (meantime). not sure what it does, I

Re: how to use __init__ in a form (passing an extra variable to the form)

2014-10-17 Thread dk
thanks Carl, that was extremely clear, step by step. took me a little bit to get the self.fields, since I was trying to override directly as ratiooo.choices. and I move the django.setup() to the top of the file after the imports (meantime). not sure what it does, I know that just need to be

Re: how to use __init__ in a form (passing an extra variable to the form)

2014-10-16 Thread Carl Meyer
Hi dk, On 10/16/2014 12:36 AM, dk wrote: > I have a form,andI want to put the email andthengetsome ratio buttons > withthe information of dishes froma restaurant. > I want to passthe restaurant id to the form,andlet the form init getall > the information andspit outthe form forrendering inthe

how to use __init__ in a form (passing an extra variable to the form)

2014-10-16 Thread dk
I have a form, and I want to put the email and then get some ratio buttons with the information of dishes from a restaurant. I want to pass the restaurant id to the form, and let the form init get all the information and spit out the form for rendering in the httml,the email form that is