Here is the content for my Quicktext.ini. This adds Django shortcuts to Notepad++ with the QuickText Plugin.

ie: type model + to insert the following model’s skeleton:

class ModelName(models.Model):
“““Model docstring”””
slug = models.SlugField(max_length=200)
name = models.CharField(max_length=100, default=‘name’)

updated = models.DateTimeField(‘update date’, auto_now=True )
created = models.DateTimeField(‘creation date’, auto_now_add=True )

class Meta:
pass

def unicode(self):
return name

def save(self, force_insert=False, force_update=False):
pass

@models.permalink
def get_absolute_url(self):
return (‘view_or_url_name’)

class ModelNameAdmin(admin.ModelAdmin):
list_display = (‘name’,)
search_fields = [‘name’,]

admin.site.register(ModelName, ModelNameAdmin)

Quicktext.ini content

[8]
a=$
asdf=text from current tagggggggg
b=$$
body=\n $\n\n$
c=$
comment=\n$
css=
cyan=#00FFFF
div=$
form=\n $\n\n$
green=#00FF00
h1=$$
h2=$$
h3=$$
h4=$$
h5=$\n$
h6=$\n$
head=\n $\n\n$
html=\n\n \n \n $\n \n \n \n $(document)\n.ready(function()\n {\n $\n })\n; \n \n \n \n $\n \n
i=$$
id=id="$"
iframe=\n$\n
img=\n$
input=\n$
js=
li=$\n$
link=$$
mangenta=#FF00FF
ol=\n $\n $\n\n$
p=$$
pre=$\n$
red=#FF0000
span=$$
table=\n \n $\n $\n \n $\n\n$
td=$\n$
title=$\n$
tr=\n $\n\n$
ul=\n $\n $\n$
white=#FFFFFF
yellow=#FFFF00
{={}
#Django Templates
autoescape={% autoescape off %}\n$\n{% endautoescape %}\n
block={% block block_name %}\n$\n{% endblock %}\n
comment={% comment %}\n$\n{% endcomment %}\n
cycle={% cycle val1 val2 as name %}
debug={% debug %}
extends={% extends “$base.html” %}
filter={% filter name %}\n$\n{% endfilter %}\n
firstof={% firstof name %}
for={% for $obj in list %}\n\n{% endfor %}\n
if={% if $v1 %}\n\n{% else %}\n\n{% endif %}\n
ifchanged={% ifchanged %}\n\n{% else %}\n\n{% endifchanged %}
ifequal={% ifequal $v1 v2 %}\n\n{% else %}\n\n{% endifequal %}\n
ife={% ifequal $v1 v2 %}\n\n{% else %}\n\n{% endifequal %}\n
ifnotequal={% ifnotequal $v1 v2 %}\n\n{% else %}\n\n{% endifnotequal %}
ifn={% ifnotequal $v1 v2 %}\n\n{% else %}\n\n{% endifnotequal %}
include={% include “$” %}
load={% load $ %}
now={% now “$jS F Y H:i” %}
regroup={% regroup $v1 by v2 as v3 %}
spaceless={% spaceless %} $ {% endspaceless %}
ssi={% ssi $ %}
trans={% trans “$” %}
_={% trans “$” %}
url={% url $v1 as v2 %}
widthratio={% widthratio $value max_value v3:100 %}
with={% with $v1 as $v2} %}

[22]
#form
form=class $FormName(forms.Form):\n “““docstring”""\n $field\n
#model
model=class $ModelName(models.Model):\n “““Model docstring”""\n slug = models.SlugField(max_length=200)\n\n name = models.CharField(max_length=100, default=‘name’)\n\n\n updated = models.DateTimeField(‘update date’, auto_now=True )\n\n created = models.DateTimeField(‘creation date’, auto_now_add=True )\n\n\n class Meta:\n pass\n\n def unicode(self):\n return name\n\n def save(self, force_insert=False, force_update=False):\n pass\n\n @models.permalink\n def get_absolute_url(self):\n return (‘view_or_url_name’)\n\n\nclass $ModelNameAdmin(admin.ModelAdmin):\n list_display = (‘name’,)\n\n search_fields = [‘name’,]\n\nadmin.site.register(ModelName, ModelNameAdmin)\n\n
#view
view=def $myview(request, a_slug):\n p = get_object_or_404(ModelName, slug=a_slug)\n\n return render_to_response(‘template_name.html’, {‘object’: p},\n context_instance=RequestContext(request)\n)\n\n
#Fields
auto=$fieldname = models.AutoField()\n\n
bool=$fieldname = models.BooleanField(default=True)\n
char=$fieldname = models.CharField(max_length=, blank=True)\n
comma=$fieldname = models.CommaSeparatedIntegerField(max_length=, blank=True)\n
date=$fieldname = models.DateField(auto_now_add=True, auto_now=True, blank=True, null=True)\n
datetime=$fieldname = models.DateTimeField(auto_now_add=True, auto_now=True, blank=True, null=True)\n
decimal=$fieldname = models.DecimalField(max_digits=, decimal_places=)\n
email=$fieldname = models.EmailField(max_length=75, blank=True)\n
file=$fieldname = models.FileField(upload_to=path/for/upload, max_length=100)\n
filepath=$fieldname = models.FilePathField(path="/abs/path/to/dir”, max_length=100, match="*.ext”, recursive=True, blank=True, )\n
float=$fieldname = models.FloatField()\n
image=$fieldname = models.ImageField(upload_to=path/for/upload, height_field=height, width_field=width, max_length=100)\n
int=$fieldname = models.IntegerField()\n
ip=$fieldname = models.IPAddressField()\n
nullbool=$fieldname = models.NullBooleanField()\n
posint=$fieldname = models.PositiveIntegerField()\n
possmallint=$fieldname = models.PositiveSmallIntegerField()\n
slug=$fieldname = models.SlugField(max_length=50, blank=True)\n
smallint=$fieldname = models.SmallIntegerField()\n
text=$fieldname = models.TextField(blank=True})\n
time=$fieldname = models.TimeField(auto_now_add=True, auto_now=True, blank=True, null=True)\n
url=$fieldname = models.URLField(verify_exists=False, max_length=200, blank=True)\n
xml=$fieldname = models.XMLField(schema_path=None, blank=True)\n

Relational Fields

fk=$fieldname = models.ForeignKey(OtherModel, related_name='', limit_choices_to= , to_field='')\n\n
m2m=$fieldname = models.ManyToManyField(OtherModel, related_name='', limit_choices_to=, symmetrical=False, through='', db_table='')\n\n
o2o=$fieldname= models.OneToOneField(OtherModel, parent_link=True, related_name='' , limit_choices_to=, to_field='')\n\n

You’ll get shortcuts for fields, models, foms and Template tags.