Changes between Version 8 and Version 9 of MagicRemovalCheatSheet


Ignore:
Timestamp:
May 11, 2006, 11:59:14 PM (19 years ago)
Author:
eugene@…
Comment:

typo corrections

Legend:

Unmodified
Added
Removed
Modified
  • MagicRemovalCheatSheet

    v8 v9  
    4545 1. [wiki:RemovingTheMagic#Interactdirectlywithmodelclassesnotwithmagicmodules Import your models directly] the Python way. For example, if your model {{{Person}}} is in {{{yourproject/yourapp/models.py}}} file, use:
    4646{{{
     47#!python
    4748from yourproject.yourapp.models import Person
    4849}}}
     
    5758 1. A former module {{{settings}}} is an instance now. [wiki:RemovingTheMagic#Movedsettingsintoaninstance Import it] using:
    5859{{{
     60#!python
    5961from django.conf import settings
    6062}}}
     
    9597   1. [wiki:RemovingTheMagic#Changedtheparametersyoupasstogenericviews Change the parameters you pass to generic views]: remove {{{app_label}}} and {{{model_name}}}, add {{{queryset}}}.
    9698 1. Update {{{settings.py}}}:
    97    1. Update {{{TEMPLATE_LOADERS}}} to reflect [wiki:RemovingTheMagic#Namespacesimplification Namespace simplification]: remove {{{core}} from their names.
     99   1. Update {{{TEMPLATE_LOADERS}}} to reflect [wiki:RemovingTheMagic#Namespacesimplification Namespace simplification]: remove {{{core}}} from their names.
     100   1. If you moved templates to {{{yourapp}}} directory (see the [wiki:MagicRemovalCheatSheet#Templates Templates section]), make sure your {{{TEMPLATE_LOADERS}}} variable includes {{{django.template.loaders.app_directories.load_template_source}}}.
    98101   1. Update {{{INSTALLED_APPS}}} to reflect [wiki:RemovingTheMagic#Namespacesimplification Namespace simplification]:
    99102     * {{{django.models.auth}}} => {{{django.contrib.auth.models}}}
Back to Top