1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add support for form fieldsets

This commit is contained in:
Jeremy Stretch
2021-02-25 13:08:02 -05:00
parent 992657cbe0
commit 2a517cde9f
2 changed files with 52 additions and 5 deletions

View File

@ -4,6 +4,14 @@ from django import template
register = template.Library()
@register.filter()
def getfield(form, fieldname):
"""
Return the specified field of a Form.
"""
return form[fieldname]
@register.inclusion_tag('utilities/render_field.html')
def render_field(field, bulk_nullable=False):
"""