From f1fc2dec07abc905440e42516957d2f46122844e Mon Sep 17 00:00:00 2001 From: Bret Walker Date: Wed, 27 Aug 2014 19:08:16 -0400 Subject: [PATCH] Update to fix Issue #124 https://github.com/yourcelf/olwidget/pull/125/files --- django-olwidget/olwidget/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django-olwidget/olwidget/forms.py b/django-olwidget/olwidget/forms.py index 4ec1778..2b1bdc6 100644 --- a/django-olwidget/olwidget/forms.py +++ b/django-olwidget/olwidget/forms.py @@ -1,4 +1,5 @@ from django import forms +from django.forms.forms import get_declared_fields from django.contrib.gis.forms.fields import GeometryField from olwidget.widgets import Map, BaseVectorLayer, EditableLayer @@ -54,7 +55,7 @@ def __new__(mcs, name, bases, attrs): except NameError: # We are defining MapModelForm itself. parents = None - declared_fields = forms.models.get_declared_fields(bases, attrs, False) + declared_fields = get_declared_fields(bases, attrs, False) new_class = super(MapModelFormMetaclass, mcs).__new__(mcs, name, bases, attrs) if not parents: