Permalink
Browse files

some admin clippings, more models and more templates

  • Loading branch information...
1 parent a86a7db commit 71e72cd7c0ffab253ed6334d9959cbc05c3ec84f Greg Newman committed May 25, 2009
@@ -0,0 +1,14 @@
+#INLINE##INDENT#
+class #SELSTART#modelname#SELEND#Admin(admin.ModelAdmin):
+ date_hierarchy = '#PLACEHOLDERSTART#...#PLACEHOLDEREND#'
+ list_display = (#PLACEHOLDERSTART#...#PLACEHOLDEREND#)
+ list_filter = (#PLACEHOLDERSTART#...#PLACEHOLDEREND#)
+ search_fields = [#PLACEHOLDERSTART#...#PLACEHOLDEREND#]
+
+ fieldsets = (#PLACEHOLDERSTART#...#PLACEHOLDEREND#)
+
+ save_as = True
+ save_on_top = True
+ inlines = [#PLACEHOLDERSTART#...#PLACEHOLDEREND#]
+
+admin.site.register(#PLACEHOLDERSTART#app#PLACEHOLDEREND#, #PLACEHOLDERSTART#modelname#PLACEHOLDEREND#Admin)
@@ -0,0 +1,5 @@
+#INLINE##INDENT#
+class #SELSTART#modelname#SELEND#Inline(admin.StackedInline):
+ model = #PLACEHOLDERSTART#model#PLACEHOLDEREND#
+ extra = #PLACEHOLDERSTART#...#PLACEHOLDEREND#
+ max_num = #PLACEHOLDERSTART#...#PLACEHOLDEREND#
@@ -0,0 +1,5 @@
+#INLINE##INDENT#
+class #SELSTART#modelname#SELEND#Inline(admin.TabularInline):
+ model = #PLACEHOLDERSTART#model#PLACEHOLDEREND#
+ extra = #PLACEHOLDERSTART#...#PLACEHOLDEREND#
+ max_num = #PLACEHOLDERSTART#...#PLACEHOLDEREND#
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.IPAddressField(blank=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.ManyToManyField(#PLACEHOLDERSTART#model#PLACEHOLDEREND#)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.NullBooleanField(default=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.PositiveIntegerField(blank=True, null=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.PositiveSmallIntegerField(blank=True, null=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.SlugField()
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.SmallIntegerField(blank=True, null=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+#SELSTART#fieldname#SELEND# = models.TextField(blank=True)
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+{% include "#SELSTART#what#SELEND#" %}
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+{% load #SELSTART#1#SELEND# %}
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+{% regroup #SELSTART#1#SELEND# by #PLACEHOLDERSTART#2#PLACEHOLDEREND# as #PLACEHOLDERSTART#3#PLACEHOLDEREND# %}
@@ -0,0 +1,2 @@
+#INLINE##INDENT#
+{{ block.super }}

0 comments on commit 71e72cd

Please sign in to comment.