did u try using the required parameter ?
In my case the default behavior was required and i
changed it to not-required by adding "required=False"
like
name = forms.CharField(widget=forms.TextInput(attrs=class_txtbox),
required=False)
On May 2, 10:18 am, zmalloc <[EMAIL PROTECTED]> wrote:
>
ModelForm currently does not provide anything like class="required"
on rendered forms where fields are required. This has led me to
create the fields manually in the form and add the style attribute to
the widget. Doing this, I then lose help_text definitions created in
the model.
So I can
On 12/23/07, Julien <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I don't understand why the form doesn't validate when I don't fill out
> a ManyToManyField.
>
> Here's the code:
>
> class Participant(models.Model):
> project = models.ForeignKey(Project, related_name='participants')
>
Oh, and here's the view:
def edit_participant(request, project_pk, participant_pk):
project = get_object_or_404(Project, pk = project_pk)
participant = get_object_or_404(Participant, pk =
participant_pk)
if request.method == 'POST':
form =
Hi there,
I don't understand why the form doesn't validate when I don't fill out
a ManyToManyField.
Here's the code:
class Participant(models.Model):
project = models.ForeignKey(Project, related_name='participants')
roles = models.ManyToManyField(Role, blank=True, null=True)
user =
5 matches
Mail list logo