Commits

Anonymous committed 5ddd1f2

a few tweaks to clean things up a bit

  • Participants
  • Parent commits 8171596

Comments (0)

Files changed (3)

File Python Django.tmbundle/Snippets/CharField (char).tmSnippet

 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>content</key>
-	<string>${1:FIELDNAME} = models.CharField(${2:blank=True, } max_length=${3:80})</string>
+	<string>${1:FIELDNAME} = models.CharField(${2:blank=True, }max_length=${3:80})</string>
 	<key>name</key>
 	<string>CharField</string>
 	<key>scope</key>

File Python Django.tmbundle/Snippets/IPAddressField.tmSnippet

 <plist version="1.0">
 <dict>
 	<key>content</key>
-	<string>${1:FIELDNAME} = models.IPAddressField()</string>
+	<string>${1:FIELDNAME} = models.IPAddressField(${2:blank=True})</string>
 	<key>name</key>
 	<string>IPAddressField</string>
 	<key>scope</key>

File Python Django.tmbundle/Snippets/Model Skeleton (model).tmSnippet

         verbose_name, verbose_name_plural = "${5:}", "${6:$5s}"}
 
     def __unicode__(self):
-        return ${7:u"$1"}</string>
+        return ${7:u"$1"}
+
+    ${6:@models.permalink
+    def get_absolute_url(self):
+        return ('${7:$1}', [${8:self.id}])}</string>
 	<key>name</key>
 	<string>Model Skeleton</string>
 	<key>scope</key>