Changes between Version 1 and Version 2 of NewbieMistakes
- Timestamp:
- Aug 14, 2005, 2:35:25 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewbieMistakes
v1 v2 1 == Purpose == 1 = NewbieMistakes = 2 2 3 Please feel free to share the things that tripped you up when you started with Django. Specifically, mistakes that were simple (e.g. syntax errors) but caused things to blow up in a confusing or frightening way . . . and due to a lack of deep understanding of what was going on under the hood, took you an hour of debugging the framework to figure out. 3 4 4 5 == And now, the list == 5 * Using include() in your URLconf file (in tutorial 3, this is myproject/settings/urls/main.py) will cause the framework to try and load your views as URLconf files. This will give you cryptic errors about how there is no module 'index' (where 'index' is some function you are trying to assign as a view), or module 'foo' has no attribute 'urlpatterns'.6 * Referencing your view files using include() in your URLconf file (in tutorial 3, this is myproject/settings/urls/main.py) will cause the framework to try and load your views as URLconf files. This will give you cryptic errors about how there is no module 'index' (where 'index' is some function you are trying to assign as a view), or module 'foo' has no attribute 'urlpatterns'. 6 7 7 * When assigning the admin attribute to your model, forgetting to add the parens to meta.Admin causes an error like '' AttributeError: class Admin has no attribute 'ordering' ''. You set your model's admin attribute equal to the class object instead of an instance.8 * When assigning the admin attribute to your model, forgetting to add the parens to meta.Admin causes an error like ''!AttributeError: class Admin has no attribute 'ordering' ''. You set your model's admin attribute equal to the class object instead of an instance.