1 |
- {"version":3,"file":"django-299d2b87.js","sources":["../../node_modules/ace-builds/src-noconflict/snippets/django.js"],"sourcesContent":["ace.define(\"ace/snippets/django.snippets\",[\"require\",\"exports\",\"module\"], function(require, exports, module){module.exports = \"# Model Fields\\n\\n# Note: Optional arguments are using defaults that match what Django will use\\n# as a default, e.g. with max_length fields. Doing this as a form of self\\n# documentation and to make it easy to know whether you should override the\\n# default or not.\\n\\n# Note: Optional arguments that are booleans will use the opposite since you\\n# can either not specify them, or override them, e.g. auto_now_add=False.\\n\\nsnippet auto\\n\\t${1:FIELDNAME} = models.AutoField(${2})\\nsnippet bool\\n\\t${1:FIELDNAME} = models.BooleanField(${2:default=True})\\nsnippet char\\n\\t${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})\\nsnippet comma\\n\\t${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})\\nsnippet date\\n\\t${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\\nsnippet datetime\\n\\t${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\\nsnippet decimal\\n\\t${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})\\nsnippet email\\n\\t${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})\\nsnippet file\\n\\t${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})\\nsnippet filepath\\n\\t${1:FIELDNAME} = models.FilePathField(path=${2:\\\"/abs/path/to/dir\\\"}${3:, max_length=100}${4:, match=\\\"*.ext\\\"}${5:, recursive=True}${6:, blank=True, })\\nsnippet float\\n\\t${1:FIELDNAME} = models.FloatField(${2})\\nsnippet image\\n\\t${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})\\nsnippet int\\n\\t${1:FIELDNAME} = models.IntegerField(${2})\\nsnippet ip\\n\\t${1:FIELDNAME} = models.IPAddressField(${2})\\nsnippet nullbool\\n\\t${1:FIELDNAME} = models.NullBooleanField(${2})\\nsnippet posint\\n\\t${1:FIELDNAME} = models.PositiveIntegerField(${2})\\nsnippet possmallint\\n\\t${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})\\nsnippet slug\\n\\t${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})\\nsnippet smallint\\n\\t${1:FIELDNAME} = models.SmallIntegerField(${2})\\nsnippet text\\n\\t${1:FIELDNAME} = models.TextField(${2:blank=True})\\nsnippet time\\n\\t${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\\nsnippet url\\n\\t${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})\\nsnippet xml\\n\\t${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})\\n# Relational Fields\\nsnippet fk\\n\\t${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})\\nsnippet m2m\\n\\t${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})\\nsnippet o2o\\n\\t${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})\\n\\n# Code Skeletons\\n\\nsnippet form\\n\\tclass ${1:FormName}(forms.Form):\\n\\t\\t\\\"\\\"\\\"${2:docstring}\\\"\\\"\\\"\\n\\t\\t${3}\\n\\nsnippet model\\n\\tclass ${1:ModelName}(models.Model):\\n\\t\\t\\\"\\\"\\\"${2:docstring}\\\"\\\"\\\"\\n\\t\\t${3}\\n\\t\\t\\n\\t\\tclass Meta:\\n\\t\\t\\t${4}\\n\\t\\t\\n\\t\\tdef __unicode__(self):\\n\\t\\t\\t${5}\\n\\t\\t\\n\\t\\tdef save(self, force_insert=False, force_update=False):\\n\\t\\t\\t${6}\\n\\t\\t\\n\\t\\t@models.permalink\\n\\t\\tdef get_absolute_url(self):\\n\\t\\t\\treturn ('${7:view_or_url_name}' ${8})\\n\\nsnippet modeladmin\\n\\tclass ${1:ModelName}Admin(admin.ModelAdmin):\\n\\t\\t${2}\\n\\t\\n\\tadmin.site.register($1, $1Admin)\\n\\t\\nsnippet tabularinline\\n\\tclass ${1:ModelName}Inline(admin.TabularInline):\\n\\t\\tmodel = $1\\n\\nsnippet stackedinline\\n\\tclass ${1:ModelName}Inline(admin.StackedInline):\\n\\t\\tmodel = $1\\n\\nsnippet r2r\\n\\treturn render_to_response('${1:template.html}', {\\n\\t\\t\\t${2}\\n\\t\\t}${3:, context_instance=RequestContext(request)}\\n\\t)\\n\";\n\n});\n\nace.define(\"ace/snippets/django\",[\"require\",\"exports\",\"module\",\"ace/snippets/django.snippets\"], function(require, exports, module){\"use strict\";\nexports.snippetText = require(\"./django.snippets\");\nexports.scope = \"django\";\n\n}); (function() {\n ace.require([\"ace/snippets/django\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","m"],"mappings":"gaAAA,IAAI,OAAO,+BAA+B,CAAC,UAAU,UAAU,QAAQ,EAAG,SAASA,EAASC,EAASC,EAAO,CAACA,EAAO,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAE9H,CAAC,EAED,IAAI,OAAO,sBAAsB,CAAC,UAAU,UAAU,SAAS,8BAA8B,EAAG,SAASF,EAASC,EAASC,EAAO,CAClID,EAAQ,YAAcD,EAAQ,mBAAmB,EACjDC,EAAQ,MAAQ,QAEhB,CAAC,EAAmB,UAAW,CACX,IAAI,QAAQ,CAAC,qBAAqB,EAAG,SAASE,EAAG,CACkBD,IAC3DA,EAAA,QAAiBC,EAE7C,CAAqB,CACrB","x_google_ignoreList":[0]}
|