Add City & Location models
This commit is contained in:
parent
ae458acc77
commit
80cf963b7f
3 changed files with 86 additions and 0 deletions
|
@ -1,3 +1,27 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from gallery.models import City, Location
|
||||
|
||||
# Register your models here.
|
||||
|
||||
|
||||
|
||||
class CityAdmin(admin.ModelAdmin):
|
||||
list_display = ('name',)
|
||||
search_fields = ('name',)
|
||||
ordering = ('name',)
|
||||
list_per_page = 30
|
||||
|
||||
|
||||
admin.site.register(City, CityAdmin)
|
||||
|
||||
|
||||
class LocationAdmin(admin.ModelAdmin):
|
||||
list_display = ('city', 'place')
|
||||
list_filter = ('city',)
|
||||
ordering = ('city__name',)
|
||||
search_fields = ('place', 'city__name',)
|
||||
list_per_page = 30
|
||||
|
||||
|
||||
admin.site.register(Location, LocationAdmin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue