Changes between Version 19 and Version 20 of DjangoCheatSheet


Ignore:
Timestamp:
09/17/2010 12:03:23 PM (4 years ago)
Author:
semperos
Comment:

Adding subsection on registering models with the admin interface

Legend:

Unmodified
Added
Removed
Modified
  • DjangoCheatSheet

    v19 v20  
    5252python manage.py sql invoices
    5353python manage.py syncdb
     54}}}
     55
     56optionally register your model with the administrative interface (if you have the admin enabled under INSTALLED_APPS in settings.py), so you get a CRUD UI for free:
     57{{{
     58# In admin.py in the same directory...
     59
     60import models
     61from django.contrib import admin
     62
     63admin.site.register(models.Ticket)
    5464}}}
    5565
Back to Top