forked from rc/aircox
admin; section.get -> section.render; templates fix; menu are now per view; doc
This commit is contained in:
19
website/forms.py
Normal file
19
website/forms.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django import forms
|
||||
|
||||
import autocomplete_light.shortcuts as al
|
||||
from autocomplete_light.contrib.taggit_field import TaggitWidget
|
||||
|
||||
import aircox.programs.models as programs
|
||||
|
||||
|
||||
class TrackForm (forms.ModelForm):
|
||||
class Meta:
|
||||
model = programs.Track
|
||||
fields = ['artist', 'name', 'tags', 'position']
|
||||
widgets = {
|
||||
'artist': al.TextWidget('TrackArtistAutocomplete'),
|
||||
'name': al.TextWidget('TrackNameAutocomplete'),
|
||||
'tags': TaggitWidget('TagAutocomplete'),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user