Initial commit.
This commit is contained in:
16
vim/snippets/django/model.snippet
Executable file
16
vim/snippets/django/model.snippet
Executable file
@@ -0,0 +1,16 @@
|
||||
class ${1:ModelName}(models.Model):
|
||||
"""${2:docstring}"""
|
||||
${3}
|
||||
|
||||
class Meta:
|
||||
${4}
|
||||
|
||||
def __unicode__(self):
|
||||
return ${5}
|
||||
|
||||
def save(self, force_insert=False, force_update=False):
|
||||
${6}
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('${7:view_or_url_name}' ${8})
|
||||
Reference in New Issue
Block a user