Migrate applications to the new admin interface.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 28 Jul 2008 16:14:08 +0000 (18:14 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 28 Jul 2008 16:14:08 +0000 (18:14 +0200)
base/admin.py [new file with mode: 0644]
events/models.py
influences/admin.py [new file with mode: 0644]
influences/models.py

diff --git a/base/admin.py b/base/admin.py
new file mode 100644 (file)
index 0000000..4353ce3
--- /dev/null
@@ -0,0 +1,7 @@
+from django.contrib import admin
+from xerxes.base.models import UserProfile
+
+class UserProfileAdmin(admin.ModelAdmin):
+    pass
+
+admin.site.register(UserProfile, UserProfileAdmin)
index 55228d46e8bd1888617ae37ab96f1184a756987a..82868b2ae685a302628bee1013a48843f52649f5 100644 (file)
@@ -13,12 +13,6 @@ class Event(models.Model):
         else:
             return self.name
 
-#    class Admin:
-#        fields = (
-#            (None,            {'fields' : ('name', 'title')} ),
-#            ('Registrations', {'fields' : ('slots',)} ),
-#        )
-
 class Registration(models.Model):
     person = models.ForeignKey(User, edit_inline=models.STACKED, num_in_admin=3)
     event  = models.ForeignKey(Event, core=True)
diff --git a/influences/admin.py b/influences/admin.py
new file mode 100644 (file)
index 0000000..afdf6d7
--- /dev/null
@@ -0,0 +1,17 @@
+from django.contrib import admin
+from xerxes.influences.models import Character, Influence
+
+class CharacterAdmin(admin.ModelAdmin):
+    list_filter=('status', 'player')
+    search_fields=('name',)
+    list_display=('player', 'name', 'status') 
+
+admin.site.register(Character, CharacterAdmin)
+
+class InfluenceAdmin(admin.ModelAdmin):
+    list_filter=('character', 'status', 'longterm')
+    search_fields=('character', 'summary', 'description', 'contact')
+    list_display=('character', 'contact', 'summary', 'longterm', 'status') 
+
+admin.site.register(Influence, InfluenceAdmin)
+    
index 8124b8550246518ae0c92638a0da40b7d8b3b787..1079b0a62b3518cf22992e8317c31a6204b15360 100644 (file)
@@ -17,11 +17,6 @@ class Character(models.Model):
     def __str__(self):
         return self.name
 
-    class Admin:
-        list_filter=('status', 'player')
-        search_fields=('name')
-        list_display=('player', 'name', 'status') 
-
     class Meta:
         verbose_name = _("Character")
         verbose_name_plural = _("Characters")
@@ -48,11 +43,6 @@ class Influence(models.Model):
     def __str__(self):
         return self.summary
 
-    class Admin:
-        list_filter=('character', 'status', 'longterm')
-        search_fields=('character', 'summary', 'description', 'contact')
-        list_display=('character', 'contact', 'summary', 'longterm', 'status') 
-
     class Meta:
         verbose_name = _("Influence")
         verbose_name_plural = _("Influences")