To test attributes

This commit is contained in:
Luis Carlos Cruz Carballo 2015-07-10 22:46:18 -04:00
parent 8e5178d236
commit c69f680c6d

View File

@ -8,14 +8,14 @@ priority -50
snippet form "Form" snippet form "Form"
class ${1:FORMNAME}(forms.Form): class ${1:FORMNAME}(forms.Form):
${2:# TODO: Define form fields here} ${2:# TODO: Define form fields here}
endsnippet endsnippet
snippet modelform "ModelForm" snippet modelform "ModelForm"
class ${1:MODELNAME}Form(forms.ModelForm): class ${1:MODELNAME}Form(forms.ModelForm):
class Meta: class Meta:
model = $1 model = $1
endsnippet endsnippet
snippet fbool "BooleanField (fbool)" snippet fbool "BooleanField (fbool)"
@ -128,35 +128,35 @@ endsnippet
snippet model "Model" snippet model "Model"
class ${1:MODELNAME}(models.Model): class ${1:MODELNAME}(models.Model):
${0}
class Meta:
verbose_name = "$1"
verbose_name_plural = "$1s"
class Meta: def __str__(self):
verbose_name = "$1" pass
verbose_name_plural = "$1s"
def __str__(self):
pass
endsnippet endsnippet
snippet modelfull "Model (full)" snippet modelfull "Model (full)"
class ${1:MODELNAME}(models.Model): class ${1:MODELNAME}(models.Model):
${2:# TODO: Define fields here} ${2:# TODO: Define fields here}
class Meta: class Meta:
verbose_name = "$1" verbose_name = "$1"
verbose_name_plural = "$1s" verbose_name_plural = "$1s"
def __str__(self): def __str__(self):
pass pass
def save(self): def save(self):
pass pass
@models.permalink @models.permalink
def get_absolute_url(self): def get_absolute_url(self):
return ('') return ('')
${3:# TODO: Define custom methods here} ${3:# TODO: Define custom methods here}
endsnippet endsnippet
@ -370,6 +370,6 @@ endsnippet
# MODEL FIELDS SNIPPETS # # MODEL FIELDS SNIPPETS #
########################################################################### ###########################################################################
snippet null "null" w snippet null "null" i
null=${1:True} null=${1:True}
endsnippet endsnippet