Skip to content

Commit

Permalink
Merge pull request #100 from luoq/master
Browse files Browse the repository at this point in the history
fixes to work with django 1.8
  • Loading branch information
elo80ka committed Dec 19, 2015
2 parents c74e5c3 + 437e611 commit 9030621
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions demo/example/forms.py
Expand Up @@ -11,10 +11,12 @@
class OrderForm(models.ModelForm):
class Meta:
model = Order
fields = '__all__'

class OrderedItemForm(models.ModelForm):
class Meta:
model = OrderedItem
fields = '__all__'

class AutoCompleteOrderedItemForm(models.ModelForm):
"""
Expand All @@ -24,6 +26,7 @@ class AutoCompleteOrderedItemForm(models.ModelForm):

class Meta:
model = OrderedItem
fields = '__all__'

class Media:
js = ('js/jquery.autocomplete.min.js', 'js/autocomplete-init.js',)
Expand Down Expand Up @@ -85,7 +88,7 @@ def _get_media(self):
media = widgets.Media(
js=('%sjs/core.js' % settings.ADMIN_MEDIA_PREFIX,)
)
media += super(EventForm, self)._get_media()
media += super(EventForm, self).media
return media
media = property(_get_media)

Expand All @@ -101,11 +104,12 @@ class AutoCompleteSelectFieldForm(models.ModelForm):
"""
Use the `AutoCompleteSelectField` to replace the default select field.
"""

product = AutoCompleteSelectField('product')

class Meta:
model = OrderedItem
fields = '__all__'

class Media:
js = ('js/jquery.autocomplete.min.js',)
Expand Down

0 comments on commit 9030621

Please sign in to comment.