You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
542 B
Python
25 lines
542 B
Python
from django.contrib import admin
|
|
import wishlist.models as m
|
|
|
|
admin.site.register(m.WishList)
|
|
|
|
from django.forms import ModelForm
|
|
from dal import autocomplete
|
|
class WishedItemAdminForm(ModelForm):
|
|
class Meta:
|
|
model = m.WishedItem
|
|
fields = '__all__'
|
|
widgets = {
|
|
'wishlists': autocomplete.ModelSelect2Multiple(
|
|
url='wishlist_list_autocomplete',
|
|
),
|
|
}
|
|
|
|
@admin.register(m.WishedItem)
|
|
class WishedItemAdmin(admin.ModelAdmin):
|
|
form = WishedItemAdminForm
|
|
filter_horizontal = ['wishlists']
|
|
|
|
|
|
#admin.site.register(m.DreamComeTrue)
|