Re: import a variable form views to forms

2009-06-29 Thread ariest
Thanks Dan. I´ve tried that but it doesnt work, there are no errors but the form doesnt display in the page. > > I think you just have to call it like this: > > form = ComentForm(request.POST, user_choices_list=children) > > I've not done it passing the POST data too, only passing in a kwarg. > >

Re: import a variable form views to forms

2009-06-29 Thread Dan Radez
On 06/29/2009 10:48 AM, ariest wrote: > Sorry, this is the actual code: > > views.py > > def parent(request): > user = request.user > key = user.get_profile().link > p = Parent.objects.get(pk = key) > children = p.children.all() > if request.method == 'POST': > fo

Re: import a variable form views to forms

2009-06-29 Thread Alex Gaynor
On Mon, Jun 29, 2009 at 12:04 PM, ariest wrote: > > Nobody? > > > > Please try to be patient. This is an all volunteer mailing list and it's only been 2 hours. Many people are at work or otherwise occupied and thus unable to reply. Alex -- "I disapprove of what you say, but I will defend to

Re: import a variable form views to forms

2009-06-29 Thread ariest
Nobody? --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...

Re: import a variable form views to forms

2009-06-29 Thread ariest
Sorry, this is the actual code: views.py def parent(request): user = request.user key = user.get_profile().link p = Parent.objects.get(pk = key) children = p.children.all() if request.method == 'POST': form = ComentForm(request.POST, children???) if form.is_va

import a variable form views to forms

2009-06-29 Thread ariest
Hello, I want to use a objects list in a ChoiceField of a form that I have in forms.py but I dont know how to do it. views.py def parent(request): user = request.user key = user.get_profile().link p = Parent.objects.get(pk = key) children = p.children.all() if request.method