Merge pull request #73 from dlo/patch-1
Add missing arguments for auto, float, int, ip, nullbool, posint, posssmallint, and smallint
This commit is contained in:
commit
a6234b9124
@ -9,7 +9,7 @@
|
|||||||
# can either not specify them, or override them, e.g. auto_now_add=False.
|
# can either not specify them, or override them, e.g. auto_now_add=False.
|
||||||
|
|
||||||
snippet auto
|
snippet auto
|
||||||
${1:FIELDNAME} = models.AutoField()
|
${1:FIELDNAME} = models.AutoField(${2})
|
||||||
snippet bool
|
snippet bool
|
||||||
${1:FIELDNAME} = models.BooleanField(${2:default=True})
|
${1:FIELDNAME} = models.BooleanField(${2:default=True})
|
||||||
snippet char
|
snippet char
|
||||||
@ -29,23 +29,23 @@ snippet file
|
|||||||
snippet filepath
|
snippet filepath
|
||||||
${1:FIELDNAME} = models.FilePathField(path=${2:"/abs/path/to/dir"}${3:, max_length=100}${4:, match="*.ext"}${5:, recursive=True}${6:, blank=True, })
|
${1:FIELDNAME} = models.FilePathField(path=${2:"/abs/path/to/dir"}${3:, max_length=100}${4:, match="*.ext"}${5:, recursive=True}${6:, blank=True, })
|
||||||
snippet float
|
snippet float
|
||||||
${1:FIELDNAME} = models.FloatField()
|
${1:FIELDNAME} = models.FloatField(${2})
|
||||||
snippet image
|
snippet image
|
||||||
${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})
|
${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})
|
||||||
snippet int
|
snippet int
|
||||||
${1:FIELDNAME} = models.IntegerField()
|
${1:FIELDNAME} = models.IntegerField(${2})
|
||||||
snippet ip
|
snippet ip
|
||||||
${1:FIELDNAME} = models.IPAddressField()
|
${1:FIELDNAME} = models.IPAddressField(${2})
|
||||||
snippet nullbool
|
snippet nullbool
|
||||||
${1:FIELDNAME} = models.NullBooleanField()
|
${1:FIELDNAME} = models.NullBooleanField(${2})
|
||||||
snippet posint
|
snippet posint
|
||||||
${1:FIELDNAME} = models.PositiveIntegerField()
|
${1:FIELDNAME} = models.PositiveIntegerField(${2})
|
||||||
snippet possmallint
|
snippet possmallint
|
||||||
${1:FIELDNAME} = models.PositiveSmallIntegerField()
|
${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})
|
||||||
snippet slug
|
snippet slug
|
||||||
${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})
|
${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})
|
||||||
snippet smallint
|
snippet smallint
|
||||||
${1:FIELDNAME} = models.SmallIntegerField()
|
${1:FIELDNAME} = models.SmallIntegerField(${2})
|
||||||
snippet text
|
snippet text
|
||||||
${1:FIELDNAME} = models.TextField(${2:blank=True})
|
${1:FIELDNAME} = models.TextField(${2:blank=True})
|
||||||
snippet time
|
snippet time
|
||||||
|
Loading…
Reference in New Issue
Block a user