Changes between Version 104 and Version 105 of RemovingTheMagic
- Timestamp:
- Apr 21, 2006, 12:50:22 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemovingTheMagic
v104 v105 305 305 || {{{permissions.get_list(package__label__exact='foo')}}} || {{{Permission.objects.filter(package__exact='foo')}}} || 306 306 307 === Be sure to import your models === 308 309 Django 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 307 311 === Changes to model syntax === 308 312