49693121ea
remove unneeded stuff from settings (we still need some in conftest.py for the tests, though) init DB for tests via conftest.py more update algorithm choices give origin zone (if we already know it) to dnstools functions new views: DomainOverview, DeleteDomain unify deletion templates using delete_object.html add django-extensions
23 lines
457 B
Python
23 lines
457 B
Python
# -*- coding: utf-8 -*-
|
|
from django import forms
|
|
|
|
from .models import Host, Domain
|
|
|
|
|
|
class CreateHostForm(forms.ModelForm):
|
|
class Meta(object):
|
|
model = Host
|
|
fields = ['subdomain', 'domain', 'comment']
|
|
|
|
|
|
class EditHostForm(forms.ModelForm):
|
|
class Meta(object):
|
|
model = Host
|
|
fields = ['comment']
|
|
|
|
|
|
class CreateDomainForm(forms.ModelForm):
|
|
class Meta(object):
|
|
model = Domain
|
|
exclude = ['created_by']
|