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.
22 lines
642 B
22 lines
642 B
# -*- coding: utf-8 -*-
|
|
from django import forms
|
|
|
|
from mydefs import ip_addr_regex
|
|
|
|
|
|
class PoolForm(forms.Form):
|
|
start_ip = forms.GenericIPAddressField(protocol='ipv4', widget=forms.TextInput(attrs={
|
|
'pattern': ip_addr_regex,
|
|
'placeholder': '127.0.0.1',
|
|
'id': 'start_ip',
|
|
'class': 'form-control',
|
|
'required': ''
|
|
}), required=True)
|
|
|
|
end_ip = forms.GenericIPAddressField(protocol='ipv4', widget=forms.TextInput(attrs={
|
|
'pattern': ip_addr_regex,
|
|
'placeholder': '127.0.0.1',
|
|
'id': 'end_ip',
|
|
'class': 'form-control',
|
|
'required': ''
|
|
}), required=True)
|