Changes between Version 11 and Version 12 of Emacs


Ignore:
Timestamp:
Feb 7, 2010, 10:34:32 AM (15 years ago)
Author:
myfreeweb
Comment:

django-mode

Legend:

Unmodified
Added
Removed
Modified
  • Emacs

    v11 v12  
    6464= Yasnippet =
    6565
    66 If you are using [http://code.google.com/p/yasnippet/ Yasnippet], you can make quick the definition of basic classes for the administration site with the following yasnippet recipe:
     66If you are using [http://code.google.com/p/yasnippet/ Yasnippet], you can get the [https://edge.launchpad.net/django-mode django-mode] with many useful snippets.
     67To get, run on a shell:
    6768{{{
    68 # -*- coding: utf-8 -*-
    69 # name: classadmin
    70 # --
    71 class ${1:ClassName}Admin (admin.ModelAdmin):
    72     pass
    73 admin.site.register($1, $1Admin)
    74 
     69bzr branch lp:django-mode
    7570}}}
    76 
    77 It will produce code like this:
     71And append something like that:
    7872{{{
    79 class ExpenseAdmin(admin.ModelAdmin):
    80     pass
    81 admin.site.register(Expense, ExpenseAdmin)
     73(load "~/Dropbox/django-mode/django-mode.el")
     74(yas/load-directory "~/Dropbox/django-mode/snippets")
    8275}}}
     76to your .emacs.
Back to Top