add space and obstacle heights

This commit is contained in:
Laura Klünder 2017-08-07 15:29:52 +02:00
parent 1a779fbcc4
commit 055df254e2
5 changed files with 59 additions and 3 deletions

View file

@ -161,8 +161,8 @@ class EditorFormBase(ModelForm):
def create_editor_form(editor_model):
possible_fields = ['slug', 'name', 'ordering', 'category', 'width', 'groups', 'color', 'priority', 'altitude',
'waytype', 'access_restriction', 'can_search', 'can_describe', 'outside',
'geometry', 'single', 'allow_levels', 'allow_spaces', 'allow_areas', 'allow_pois',
'waytype', 'access_restriction', 'height', 'default_height', 'can_search', 'can_describe',
'outside', 'geometry', 'single', 'allow_levels', 'allow_spaces', 'allow_areas', 'allow_pois',
'left', 'top', 'right', 'bottom']
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]