Re: forms question in django 1.1

2010-04-28 Thread knight
Thanks a lot. That's the problem. As always, my stupid mistake. On Apr 28, 6:12 pm, Bill Freeman wrote: > I do notice that you have 'player_option' in the fields tuple, while > there is no such model field, but instead a field named 'player_options' > (plural).  If that's actually in the source,

Re: forms question in django 1.1

2010-04-28 Thread Bill Freeman
I do notice that you have 'player_option' in the fields tuple, while there is no such model field, but instead a field named 'player_options' (plural). If that's actually in the source, I'd fix it before looking any harder. On Wed, Apr 28, 2010 at 10:32 AM, knight wrote: > I have the following f

forms question in django 1.1

2010-04-28 Thread knight
I have the following form: class ModuleItemForm2(forms.ModelForm): class Meta: model = Module_item fields = ('title', 'media', 'thumb', 'desc', 'default', 'player_option') The model is: class Module_item(models.Model): title = models.CharField(max_length=100) layout =

Customizing Admin Forms Question

2010-01-15 Thread Joel Davis
I've got a couple of questions about customizing the admin pages... First, is there a way to specify the layout/template for an admin form by hand? I've got a Model that has a bunch of optional fields, including a bunch of TextAreas, and the form is huge and jumbled. I'd like to make a custom temp

Re: Generating forms question.

2009-07-17 Thread Shawn Milochik
On Jul 16, 2009, at 5:16 AM, Viacheslav Chumushuk wrote: > > class Book(models.Model): >author = models.ForeignKey(Author) >title = models.CharField(max_length=100) > > All that I need is edit some book by primary key. Just make a forms.ModelForm for your Book model. The class Meta will

Generating forms question.

2009-07-16 Thread Viacheslav Chumushuk
Hello. I have one problem with forms, which I can't resolve. I was looking at official documentation, searching in web, but didn't found solution. So, problem is next. I have two models: class Author(models.Model): name = models.CharField(max_length=100) class Book(models.Model): author

Re: Forms Question

2008-11-06 Thread Robocop
Never mind, i finally realized what was so drastically different between .96 forms and 1.0 forms. Thanks for the help! On Nov 6, 4:33 pm, Robocop <[EMAIL PROTECTED]> wrote: > So i've just gotten back on this project, and it looks like i'm still > doing something wrong with my forms code. > > Wha

Re: Forms Question

2008-11-06 Thread Robocop
So i've just gotten back on this project, and it looks like i'm still doing something wrong with my forms code. What i have right now is: def timesheets_add(request): if request.method == 'POST': form = TimeSheetForm(request.POST) if form.is_valid(): form.save() return rende

Re: Forms Question

2008-11-03 Thread [EMAIL PROTECTED]
Yep, you need to do the if is_valid() stuff, but other than the save() method it works like a normal form, more or less. On Nov 3, 8:07 pm, Robocop <[EMAIL PROTECTED]> wrote: > I tried that earlier but i failed terribly at syntax.  Should it be: > > f = ModelForm(request.POST) > f.save() > > On N

Re: Forms Question

2008-11-03 Thread Robocop
I tried that earlier but i failed terribly at syntax. Should it be: f = ModelForm(request.POST) f.save() On Nov 3, 5:37 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > On Nov 4, 2008, at 8:14 AM, Robocop wrote: > > > > > > > I'm working with some rather long forms, and i've processed them in

Re: Forms Question

2008-11-03 Thread Eric Abrahamsen
On Nov 4, 2008, at 8:14 AM, Robocop wrote: > > I'm working with some rather long forms, and i've processed them in a > pretty basic way. I read in the post data for every field, then just > create a new table entry using the form data. > > Something like: > if request.method == 'POST': > if fo

Forms Question

2008-11-03 Thread Robocop
I'm working with some rather long forms, and i've processed them in a pretty basic way. I read in the post data for every field, then just create a new table entry using the form data. Something like: if request.method == 'POST': if form.is_valid(): var_a = form.cleaned_data['var_a'] v

Re: Newbie Forms Question

2008-10-11 Thread Russell Keith-Magee
On Sat, Oct 11, 2008 at 8:05 PM, d. <[EMAIL PROTECTED]> wrote: > > Probably a simple, stupid error I'm making: > > I try to display a form in a template using: > > > {{ rForm.as_table }} > > > > > The browser displays pure html of the form content, having the form- > source all escaped to som

Newbie Forms Question

2008-10-11 Thread d.
Sorry, I first posted this on the django developppers group, which was obviously wrong. Probably a simple, stupid error I'm making: I try to display a form in a template using: {{ rForm.as_table }} The browser displays pure html of the form content, having the form- source all escaped to s

Re: forms question

2008-02-14 Thread Michael Newman
This one has been debated over and over. It has been decided that there will be no more as_...() because it is simple enough to hook into the class and make your own. Here is the discussion over at django-devs: https://groups.google.com/group/django-developers/browse_thread/thread/e3bcd07da81c327

forms question

2008-02-14 Thread Chris
will there ever be an forms.as_div method? tables seems kinda old school. --~--~-~--~~~---~--~~ 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 un

Newbie forms question:

2007-10-26 Thread schlam
so I am using the code from the Django documentation to processes information from a form with the code : def edit_place(request, place_id): try: manipulator = Place.ChangeManipulator(place_id) place = manipulator.original_object if request.method == 'POST': new_dat