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,
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
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 =
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
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
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
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
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
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
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
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
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
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
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
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
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
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
17 matches
Mail list logo