Code

Changes between Version 104 and Version 105 of RemovingTheMagic


Ignore:
Timestamp:
04/20/06 22:50:22 (8 years ago)
Author:
lalo.martins@…
Comment:

documenting one other difference I noticed

Legend:

Unmodified
Added
Removed
Modified
  • RemovingTheMagic

    v104 v105  
    305305|| {{{permissions.get_list(package__label__exact='foo')}}}  || {{{Permission.objects.filter(package__exact='foo')}}}  || 
    306306     
     307=== Be sure to import your models === 
     308 
     309Django won't recursively import everything inside a "models" package in your app.  In fact, "startapp" doesn't even create "models" as a package anymore!  Now Django imports "yourapp.models", and uses whatever classes in there that are subclasses of {{{models.Model}}}.  So if you want to keep using a package, you need to go in your {{{___init__.py}}} and do something like {{{from mymodelmodule import *}}}.  -- LaloMartins 
     310 
    307311=== Changes to model syntax === 
    308312