Skip to content
Browse files

Improved CharField to add a stop before the max_length for a label

Improved DecimalField to add max_digits and decimal_places
  • Loading branch information...
1 parent ec243cb commit 165319ced37c95fa877111f23790d7b31f81cbe7 @hvdklauw committed Mar 2, 2012
View
4 Models/Model Fields/CharField (m_char).sublime-snippet
@@ -1,7 +1,7 @@
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
- <content><![CDATA[${1:FIELDNAME} = models.CharField(max_length=${2:50})]]></content>
+ <content><![CDATA[${1:FIELDNAME} = models.CharField($2, max_length=${3:50})]]></content>
<tabTrigger>mchar</tabTrigger>
<scope>source.python</scope>
<description>CharField (mchar)</description>
-</snippet>
+</snippet>
View
4 Models/Model Fields/DecimalField (m_decimal).sublime-snippet
@@ -1,7 +1,7 @@
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
- <content><![CDATA[${1:FIELDNAME} = models.DecimalField($2)]]></content>
+ <content><![CDATA[${1:FIELDNAME} = models.DecimalField($2, max_digits={$3:5}, decimal_places={$4:2})]]></content>
<tabTrigger>mdecimal</tabTrigger>
<scope>source.python</scope>
<description>DecimalField (mdecimal)</description>
-</snippet>
+</snippet>

0 comments on commit 165319c

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