From f9292b28a5a3b4bec30855d0f8557b431242f750 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Fri, 23 Dec 2011 13:19:17 +0530 Subject: [PATCH] admin config show added tables --- chaloBEST/chalobest.db | Bin 988160 -> 1001472 bytes chaloBEST/mumbai/admin.py | 40 +++++++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/chaloBEST/chalobest.db b/chaloBEST/chalobest.db index 2f63cdf8ad4ed069cd9de15d6da645e6f5f9e553..4948848ee6ddbaff616837ec3d212b98c412c970 100644 GIT binary patch delta 3110 zcmai0TWk|o5Z!xcmra8y*m1B;2yC2~#&trxUay^mPzc23p(IcUqBTfnlQqQP#1PD* zpvp<8T2<;t!u~{6h05cjLKSMUM1K$;v})-qJW{o&s1oI;RJ4`&;RlKK?lbGirIu&3 zcOG}<&dfc#qaSySPOP4&amo}0cc|H4WU@&J$W-%#r3?{P!ZhJ<6Q05ocnp8S@9+SA zg}X2V(?zGZ8!F&Nm{^ES%3Wx3V0faM|Dc)^^&fx(eDNu}y~Py~xG>)yjkkxxE5mKA z(O6q?PyB)d+-OE&yXq=%2s7w!G()`3qk_-PP&K}q!CW>YOK%Px8S0lZ#-h54p*%j1 zoIaS#>k93$!NpK7`2vUYxr1CbHz4IRxnW(cicCq3lc8#TwOMIc9+E~5=mzF0w1}Zv ze4#;Uq`2+X%c#kXM=97(PJ4}<`zD-)Bvzmu-@>E#Dr^P>F8l~y#uwmyc#EXH6>oLX zz8X}Lt$Pve^B5v6&nge?3m5`>X09sQS8K@4gq+1&o1=^a&`}CloI^)Zh{UNy7VQ>3?R z;6%@fb=fx}J(1-8~)tkVVQ|6!Q}kEHt2H3OmJnF^e9fd+1Aa5lx^`G=!39BNB+x z>76dPX%s|mIh{@C(_y~8nGWq8{);$j*#BbT~~T^y~ZQ3yGWz0A`Ky42Xllt#4F zoc1#DOX=d$4;~`uz*7qQq2$HC;2-fczJagftN0536ko&_@EJTsI_Jg8{WElzyMqCQ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+7j9$bhFT2p?yO8g>E_0tz*CPY; diff --git a/chaloBEST/mumbai/admin.py b/chaloBEST/mumbai/admin.py index e081711..4d0347a 100644 --- a/chaloBEST/mumbai/admin.py +++ b/chaloBEST/mumbai/admin.py @@ -5,16 +5,27 @@ from mumbai.models import * class AreaAdmin(admin.ModelAdmin): list_display = ("a_code", "areanm") list_editable = ("areanm",) - + formfield_overrides = { + models.TextField: {'widget': forms.TextInput}, + } + class RoadAdmin(admin.ModelAdmin): list_display = ("roadcd","roadnm") list_editable = ("roadnm",) + + formfield_overrides = { + models.TextField: {'widget': forms.TextInput}, + } class FareAdmin(admin.ModelAdmin): list_display = ("slab","ordinary","limited","express","ac","ac_express") list_editable = ("ordinary","limited","express","ac","ac_express") + formfield_overrides = { + models.TextField: {'widget': forms.TextInput}, + } + class StopForm(forms.ModelForm): @@ -26,7 +37,8 @@ class StopAdmin(admin.ModelAdmin): list_display = ("stopcd","stopnm", "roadcd","a_code","stopfl","depot","chowki") list_editable = ("stopnm", "roadcd","a_code","stopfl","depot","chowki") search_fields = ("stopcd",'stopnm', 'depot') - ordering = ('-stopnm',) + ordering = ('stopnm',) + list_per_page = 50 fieldsets = ( (None, { @@ -59,9 +71,23 @@ class RouteTypesAdmin(admin.ModelAdmin): class HardCodedRoutesAdmin(admin.ModelAdmin): list_display = ("routecode","routealias","faretype") -class AreaAdmin(admin.ModelAdmin): - list_display = ("a_code", "areanm") - list_editable = ("areanm",) +class LandmarkAdmin(admin.ModelAdmin): + list_display = ("name", "name_mr") + list_editable = ("name_mr",) + +class StopLocationAdmin(admin.ModelAdmin): + list_display = ("stop", "direction") + #list_editable = ("name","name_mr") + +class DepotAdmin(admin.ModelAdmin): + list_display = ("depot_code", "depot_name", "stop") + list_editable = ("depot_name",) + + +class HolidayAdmin(admin.ModelAdmin): + list_display = ("h_date", "h_name") + list_editable = ("h_name",) + admin.site.register(Area, AreaAdmin) @@ -75,3 +101,7 @@ admin.site.register(Route, RouteAdmin) admin.site.register(RouteTypes, RouteTypesAdmin) admin.site.register(HardCodedRoutes, HardCodedRoutesAdmin) +admin.site.register(Landmark, LandmarkAdmin ) +admin.site.register(Depot,DepotAdmin) +admin.site.register(Holiday,HolidayAdmin) +admin.site.register(StopLocation,StopLocationAdmin)