From dbd71c52e93b14b05b56e30fddb29d29caa7e2d4 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 3 Feb 2012 19:07:29 +0530 Subject: [PATCH] remove admin import from models.py (why was it there??) --- chaloBEST/mumbai/admin.py | 8 ++++---- chaloBEST/mumbai/models.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chaloBEST/mumbai/admin.py b/chaloBEST/mumbai/admin.py index 475a48a..4ebf175 100644 --- a/chaloBEST/mumbai/admin.py +++ b/chaloBEST/mumbai/admin.py @@ -6,7 +6,7 @@ class RouteScheduleInline(admin.StackedInline): model = RouteSchedule extras = 0 -class AreaAdmin(admin.ModelAdmin): +class AreaAdmin(admin.OSMGeoAdmin): list_display = ("code", "name") list_editable = ("name",) formfield_overrides = { @@ -14,7 +14,7 @@ class AreaAdmin(admin.ModelAdmin): } -class RoadAdmin(admin.ModelAdmin): +class RoadAdmin(admin.OSMGeoAdmin): list_display = ("code","name") list_editable = ("name",) @@ -40,7 +40,7 @@ class StopForm(forms.ModelForm): model = Stop -class StopAdmin(admin.ModelAdmin): +class StopAdmin(admin.OSMGeoAdmin): list_display = ("code","name","name_mr", "road","area","dbdirection","depot","chowki" ) list_editable = ("name", "name_mr","dbdirection","depot","chowki") search_fields = ("code",'name', 'depot') @@ -97,7 +97,7 @@ class LandmarkAdmin(admin.ModelAdmin): models.TextField: {'widget': forms.TextInput}, } -class StopLocationAdmin(admin.ModelAdmin): +class StopLocationAdmin(admin.OSMGeoAdmin): list_display = ("stop", "direction", "point") formfield_overrides = { diff --git a/chaloBEST/mumbai/models.py b/chaloBEST/mumbai/models.py index 96adcd2..e2b4413 100644 --- a/chaloBEST/mumbai/models.py +++ b/chaloBEST/mumbai/models.py @@ -1,5 +1,4 @@ from django.contrib.gis.db import models -from django.contrib import admin from django import forms STOP_CHOICES = ( ('U','Up'),