Changes between Version 4 and Version 5 of MagicRemovalCheatSheet
- Timestamp:
- May 11, 2006, 11:13:29 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MagicRemovalCheatSheet
v4 v5 60 60 from django.conf import settings 61 61 }}} 62 1. Update your code to reflect model changes you did in the Models section above. 62 63 1. [wiki:RemovingTheMagic#Includetemplateextensionexplicitly Include template extensions explicitly]. 63 64 1. [wiki:RemovingTheMagic#Descriptorfields Convert to new Database API]. ''Warning: usually this is the most time-consuming step. Be careful!'' … … 75 76 1. Template tags {{{extends}}} and {{{include}}} [wiki:RemovingTheMagic#Includetemplateextensionexplicitly should include template extensions explicitly]. 76 77 1. [wiki:RemovingTheMagic#Changedtemplatenamesingenericviews Change template names for generic views]: remove pluralization of model names. 77 1. If your template uses Django's methods defined on its parameters, try to move this code to corresponding views, if possible. Otherwise apply changes outlined in Views section above.78 1. If your template uses Django's methods defined on its parameters, try to move this code to corresponding views, if possible. Otherwise apply changes outlined in the Views section above. 78 79 79 80 == Template tags == 80 == Settings and URLs == 81 82 1. [wiki:RemovingTheMagic#Namespacesimplification Change import statements] to reflect the namespace simplification: 83 * {{{django.core.template}}} => {{{django.template}}} 84 * {{{django.core.extensions}}} => {{{django.shortcuts}}} 85 * '''renamed:''' {{{django.core.extensions.DjangoContext}}} => {{{django.template.RequestContext}}} 86 1. If your template tag uses external templates, [wiki:RemovingTheMagic#Includetemplateextensionexplicitly include template extensions explicitly]. 87 1. [wiki:RemovingTheMagic#RemovedSilentVariableFailureexception SilentVariableFailure exception was removed]: use {{{silent_variable_failure}}} attribute instead. 88 1. Update your code to reflect model changes you did in the Models section above, if applicable. 89 1. If your template tag implements a high-level view-like functionality, apply changes outlined in the Views section above. 90 91 == URLs and settings == 81 92 82 93 == Post-conversion ==