mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-02-27 07:31:17 +01:00
fixing a deprecated usage, and adding a minor branch control
This commit is contained in:
parent
cbbad8d370
commit
bea6fbf75a
@ -69,9 +69,11 @@ class CustomFieldMixin(object):
|
|||||||
elif field.data_type == 'url':
|
elif field.data_type == 'url':
|
||||||
fieldclass = forms.URLField
|
fieldclass = forms.URLField
|
||||||
elif field.data_type == 'ipaddress':
|
elif field.data_type == 'ipaddress':
|
||||||
fieldclass = forms.IPAddressField
|
fieldclass = forms.GenericIPAddressField
|
||||||
elif field.data_type == 'slug':
|
elif field.data_type == 'slug':
|
||||||
fieldclass = forms.SlugField
|
fieldclass = forms.SlugField
|
||||||
|
else:
|
||||||
|
raise NameError("Unrecognized data_type %s" % field.data_type)
|
||||||
|
|
||||||
self.fields['custom_%s' % field.name] = fieldclass(**instanceargs)
|
self.fields['custom_%s' % field.name] = fieldclass(**instanceargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user