Skip to content
Browse files

model and ifequal template tag

  • Loading branch information...
1 parent e60203d commit 6c5900feb7c36cc79b5d686e84b814db2dbc19a7 @gregnewman committed May 24, 2009
Showing with 19 additions and 0 deletions.
  1. +15 −0 Python.py/django/models/model
  2. +4 −0 Python.py/django/templates/ifequal
View
15 Python.py/django/models/model
@@ -0,0 +1,15 @@
+#INLINE##INDENT#
+class #SELSTART#modelname#SELEND#(models.Model):
+ """#PLACEHOLDERSTART#description...#PLACEHOLDEREND#"""
+
+
+ class Meta:
+ ordering = ['#PLACEHOLDERSTART#order#PLACEHOLDEREND#',]
+ verbose_name, verbose_name_plural = "#PLACEHOLDERSTART#verbosename#PLACEHOLDEREND#", "#PLACEHOLDERSTART#verbosenameplural#PLACEHOLDEREND#"
+
+ def __unicode__(self):
+ return "%s" % (self.#PLACEHOLDERSTART#name#PLACEHOLDEREND#)
+
+ @models.permalink
+ def get_absolute_url(self):
+ return ('')
View
4 Python.py/django/templates/ifequal
@@ -0,0 +1,4 @@
+#INLINE##INDENT#
+{% ifequal #PLACEHOLDERSTART#first#PLACEHOLDEREND# #PLACEHOLDERSTART#second#PLACEHOLDEREND# %}
+ #PLACEHOLDERSTART#...#PLACEHOLDEREND#
+{% endifequal %}

0 comments on commit 6c5900f

Please sign in to comment.
Something went wrong with that request. Please try again.