You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
552 B

7 years ago
from django import forms
#from crispy_forms.helper import FormHelper
#from crispy_forms.layout import Submit, Layout
#from django.urls import reverse
from .models import Maintainer, Contact
class MntForm(forms.ModelForm):
class Meta:
model = Maintainer
fields = ['handle', 'description']
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = ['handle', 'name']
def __init__(self, person=True, *args, **kwargs):
super(ContactForm, self).__init__(*args, **kwargs)
# check if this is a person
self.person = person