9 lines
467 B
Python
9 lines
467 B
Python
from django import forms
|
|
|
|
from .models import Organization
|
|
|
|
class NetworkForm(forms.Form):
|
|
name = forms.CharField(label="Common Name", max_length=64)
|
|
intip = forms.GenericIPAddressField(label="Internal IP Address", protocol="ipv4")
|
|
extip = forms.GenericIPAddressField(label="External IP Address", protocol="ipv4")
|
|
orgas = forms.MultipleChoiceField(label="Assigned Organizations", choices=[(orga.id, str(orga)) for orga in Organization.objects.all()])
|