minor, admin

This commit is contained in:
Sanj 2011-04-12 15:46:10 +05:30
parent 9ce871badd
commit a448c8f388
2 changed files with 3 additions and 2 deletions

View File

@ -1,18 +1,19 @@
from django.contrib.gis import admin from django.contrib.gis import admin
# from django.contrib import admin
# from django.contrib.gis.maps.google import GoogleMap # from django.contrib.gis.maps.google import GoogleMap
from models import * from models import *
class PropertyAdmin(admin.OSMGeoAdmin): class PropertyAdmin(admin.OSMGeoAdmin):
# class PropertyAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'street_locality', 'tenure', 'ground_rent_due', 'laughton_no', 'area_sqm',) list_display = ('__unicode__', 'street_locality', 'tenure', 'ground_rent_due', 'laughton_no', 'area_sqm',)
list_filter = ('stable',) list_filter = ('stable',)
search_fields = ('street_locality',) search_fields = ('street_locality',)
map_template = 'gis/admin/google.html' map_template = 'gis/admin/osm.html'
default_lon = 72.855211097628413 default_lon = 72.855211097628413
default_lat = 19.415775291486027 default_lat = 19.415775291486027
default_zoom = 4 default_zoom = 4
extra_js = ['http://openstreetmap.org/openlayers/OpenStreetMap.js', 'http://maps.google.com/maps?file=api&v=2&key=%s' % 'abcd'] extra_js = ['http://openstreetmap.org/openlayers/OpenStreetMap.js', 'http://maps.google.com/maps?file=api&v=2&key=%s' % 'abcd']
admin.site.register(Property, PropertyAdmin) admin.site.register(Property, PropertyAdmin)
admin.site.register(Stable) admin.site.register(Stable)

0
citysurvey/manage.py Executable file → Normal file
View File