Skip to content

Instantly share code, notes, and snippets.

@jtiai
Created March 14, 2013 12:47
Show Gist options
  • Save jtiai/5161044 to your computer and use it in GitHub Desktop.
Save jtiai/5161044 to your computer and use it in GitHub Desktop.
class RegistrationForm(ModelForm):
address = ModelChoiceField(queryset=ADDRESS_MODEL.objects.all(), widget=HiddenInput())
service_area = ModelChoiceField(queryset=ServiceArea.objects.all(), widget=HiddenInput(), required=False)
apartment_type = ModelChoiceField(queryset=ApartmentType.objects.all(), empty_label=None, label=capfirst(Registration.apartment_type.field.verbose_name))
registration_accuracy = IntegerField(widget=HiddenInput())
forced_add = BooleanField(label=_('Forced add'), required=False)
unique_id = CharField(max_length=64, widget=HiddenInput())
class Meta:
model = Registration
exclude = ('confirmed', 'deleted', 'confirmkey', 'creation_date', 'changed_date', 'service_area_version', 'language', )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment