diff options
Diffstat (limited to 'app/locations/admin.py')
-rw-r--r-- | app/locations/admin.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/locations/admin.py b/app/locations/admin.py index b428e0d..03f0696 100644 --- a/app/locations/admin.py +++ b/app/locations/admin.py @@ -1,5 +1,4 @@ from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin from .models import Region, Country, Location, State, Route, LuxCheckIn, Campsite, GPXFile, GPXTrack, Track @@ -9,7 +8,7 @@ from utils.widgets import LGEntryForm @admin.register(Region) -class RegionAdmin(OSMGeoAdmin): +class RegionAdmin(admin.ModelAdmin): list_display = ('name', 'slug') prepopulated_fields = {'slug': ('name',)} search_fields = ('name',) @@ -51,7 +50,7 @@ class RegionAdmin(OSMGeoAdmin): @admin.register(Country) -class CountryAdmin(OSMGeoAdmin): +class CountryAdmin(admin.ModelAdmin): list_display = ('name', 'pop2005', 'region', 'subregion') search_fields = ('name',) ordering = ('name',) @@ -117,7 +116,7 @@ class CountryAdmin(OSMGeoAdmin): @admin.register(State) -class StateAdmin(OSMGeoAdmin): +class StateAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'slug', 'country', 'pub_date') prepopulated_fields = {'slug': ('name',)} search_fields = ('name', 'country') @@ -161,7 +160,7 @@ class StateAdmin(OSMGeoAdmin): @admin.register(Location) -class LocationAdmin(OSMGeoAdmin): +class LocationAdmin(admin.ModelAdmin): list_display = ('name', 'pub_date', 'parent', 'state', 'slug') prepopulated_fields = {'slug': ('name',)} search_fields = ('name', 'state') @@ -198,9 +197,8 @@ class LocationAdmin(OSMGeoAdmin): class Media: js = ('next-prev-links.js',) - @admin.register(Route) -class RouteAdmin(OSMGeoAdmin): +class RouteAdmin(admin.ModelAdmin): list_display = ('name', 'slug') prepopulated_fields = {'slug': ('name',)} search_fields = ('name',) |