
from django import forms


class ActivitySubscribeForm(forms.Form):
    id = forms.IntegerField(
        min_value = 0, required=True,
        widget = forms.HiddenInput,
    )
    title = forms.CharField(
        max_length=100, required=True,
        widget = forms.HiddenInput,
    )


class ProposalForm(forms.Form):
    title = forms.CharField(
        max_length=100, required=True,
    )
    subtitle = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    duration = forms.CharField(
        max_length=50, required=True,
    )
    max_places = forms.IntegerField(
        min_value = 0, required=True,
    )
    show_owners = forms.BooleanField(
        initial = False, required = False,
    )
    requires_inscription = forms.BooleanField(
        initial = False, required = False,
    )
    owners = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    organizers = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    text = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    logistics = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    notes_organization = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )



from django import forms


class ActivitySubscribeForm(forms.Form):
    id = forms.IntegerField(
        min_value = 0, required=True,
        widget = forms.HiddenInput,
    )
    title = forms.CharField(
        max_length=100, required=True,
        widget = forms.HiddenInput,
    )


class ProposalForm(forms.Form):
    title = forms.CharField(
        max_length=100, required=True,
    )
    subtitle = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    duration = forms.CharField(
        max_length=50, required=True,
    )
    max_places = forms.IntegerField(
        min_value = 0, required=True, initial = 0,
    )
    show_owners = forms.BooleanField(
        initial = False, required = False,
    )
    requires_inscription = forms.BooleanField(
        initial = False, required = False,
    )
    owners = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    organizers = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    text = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    logistics = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    notes_organization = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )


Add default to max_places in proposal form
Add default to max_places in proposal form

  
  from django import forms
  
  
  class ActivitySubscribeForm(forms.Form):
      id = forms.IntegerField(
          min_value = 0, required=True,
          widget = forms.HiddenInput,
      )
      title = forms.CharField(
          max_length=100, required=True,
          widget = forms.HiddenInput,
      )
  
  
  class ProposalForm(forms.Form):
      title = forms.CharField(
          max_length=100, required=True,
      )
      subtitle = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
      duration = forms.CharField(
          max_length=50, required=True,
      )
      max_places = forms.IntegerField(
-         min_value = 0, required=True,
+         min_value = 0, required=True, initial = 0,
      )
      show_owners = forms.BooleanField(
          initial = False, required = False,
      )
      requires_inscription = forms.BooleanField(
          initial = False, required = False,
      )
      owners = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
      organizers = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
      text = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
      logistics = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
      notes_organization = forms.CharField(
          required = False,
          widget = forms.Textarea,
      )
  
  
Add default to max_places in proposal form
## Code Before:

from django import forms


class ActivitySubscribeForm(forms.Form):
    id = forms.IntegerField(
        min_value = 0, required=True,
        widget = forms.HiddenInput,
    )
    title = forms.CharField(
        max_length=100, required=True,
        widget = forms.HiddenInput,
    )


class ProposalForm(forms.Form):
    title = forms.CharField(
        max_length=100, required=True,
    )
    subtitle = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    duration = forms.CharField(
        max_length=50, required=True,
    )
    max_places = forms.IntegerField(
        min_value = 0, required=True,
    )
    show_owners = forms.BooleanField(
        initial = False, required = False,
    )
    requires_inscription = forms.BooleanField(
        initial = False, required = False,
    )
    owners = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    organizers = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    text = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    logistics = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    notes_organization = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )


## Instruction:
Add default to max_places in proposal form
## Code After:

from django import forms


class ActivitySubscribeForm(forms.Form):
    id = forms.IntegerField(
        min_value = 0, required=True,
        widget = forms.HiddenInput,
    )
    title = forms.CharField(
        max_length=100, required=True,
        widget = forms.HiddenInput,
    )


class ProposalForm(forms.Form):
    title = forms.CharField(
        max_length=100, required=True,
    )
    subtitle = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    duration = forms.CharField(
        max_length=50, required=True,
    )
    max_places = forms.IntegerField(
        min_value = 0, required=True, initial = 0,
    )
    show_owners = forms.BooleanField(
        initial = False, required = False,
    )
    requires_inscription = forms.BooleanField(
        initial = False, required = False,
    )
    owners = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    organizers = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    text = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    logistics = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )
    notes_organization = forms.CharField(
        required = False,
        widget = forms.Textarea,
    )

