On 5/18/2009 12:55 PM, Rusty Greer wrote:
>
> i have the following:
>
> a model:
> class MyClass(models.Model):
> otherClass = models.ForeignKey('otherClass')
> someData = models.CharField(max_length=20)
>
>
> class MyClassForm(forms.ModelForm):
>
> class Meta:
> model = M
i have the following:
a model:
class MyClass(models.Model):
otherClass = models.ForeignKey('otherClass')
someData = models.CharField(max_length=20)
class MyClassForm(forms.ModelForm):
class Meta:
model = MyClass
fields = ('someData')
When the user edits or adds a M
On Nov 26, 4:25 pm, fiedzia <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am trying to achieve the following effect:
>
> A ModelForm containing list of choices and input to possibly add
> another
> element to the list is presented on page.
> If user will not choose any item from list and will type somet
Hi
I am trying to achieve the following effect:
A ModelForm containing list of choices and input to possibly add
another
element to the list is presented on page.
If user will not choose any item from list and will type something
into
new_item field, then:
- if new_item is present on the list,
Lets say I have a model:
class Foo(models.Model):
name = models.charField()
age = models.IntegerField ()
Then I create a form like this:
class FooForm (ModelForm):
salutation =
forms.ChoiceField(choices=common.SALUTATION_CHOICES,
label="Salutation")
class
5 matches
Mail list logo