Skip to content

Instantly share code, notes, and snippets.

@rgaudin
Created October 8, 2009 16:24
Show Gist options
  • Save rgaudin/205135 to your computer and use it in GitHub Desktop.
Save rgaudin/205135 to your computer and use it in GitHub Desktop.
diff --git a/apps/locations/admin.py b/apps/locations/admin.py
index 7adac12..6341cb4 100644
--- a/apps/locations/admin.py
+++ b/apps/locations/admin.py
@@ -5,6 +5,10 @@
from django.contrib import admin
from locations.models import *
+class LocationAdmin(admin.ModelAdmin):
+ list_display = ('__unicode__', 'code', 'type', 'parent',)
+ list_filter = ['type',]
+ ordering = ('name',)
admin.site.register(LocationType)
-admin.site.register(Location)
+admin.site.register(Location, LocationAdmin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment