allow new category fields in editor
This commit is contained in:
parent
2d3d67403c
commit
3e7589a217
1 changed files with 1 additions and 0 deletions
|
@ -125,6 +125,7 @@ class MapitemFormMixin(ModelForm):
|
||||||
def create_editor_form(editor_model):
|
def create_editor_form(editor_model):
|
||||||
possible_fields = ['slug', 'name', 'altitude', 'category', 'width', 'groups', 'color', 'public',
|
possible_fields = ['slug', 'name', 'altitude', 'category', 'width', 'groups', 'color', 'public',
|
||||||
'can_search', 'can_describe', 'outside', 'stuffed', 'geometry',
|
'can_search', 'can_describe', 'outside', 'stuffed', 'geometry',
|
||||||
|
'priority', 'single', 'allow_levels', 'allow_spaces', 'allow_areas', 'allow_pois',
|
||||||
'left', 'top', 'right', 'bottom']
|
'left', 'top', 'right', 'bottom']
|
||||||
field_names = [field.name for field in editor_model._meta.get_fields() if not field.one_to_many]
|
field_names = [field.name for field in editor_model._meta.get_fields() if not field.one_to_many]
|
||||||
existing_fields = [name for name in possible_fields if name in field_names]
|
existing_fields = [name for name in possible_fields if name in field_names]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue