Changes between Version 12 and Version 13 of MagicRemovalCheatSheet
- Timestamp:
- May 12, 2006, 2:12:15 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MagicRemovalCheatSheet
v12 v13 66 66 1. [wiki:RemovingTheMagic#RenamedDoesNotExistexception Rename DoesNotExist exception]: {{{people.PersonDoesNotExist}}} becomes {{{Person.DoesNotExist}}}. 67 67 1. If you use {{{get_object_or_404()}}} and {{{get_list_or_404()}}}, [wiki:RemovingTheMagic#get_object_or_404andget_list_or_404nowtakemodelclassesnotmodules change their parameters]. Note: you cannot use ''field''{{{__ne}}} and {{{order_by}}} keywords. Use {{{exclude()}}} and {{{order_by()}}} methods of [wiki:RemovingTheMagic#Descriptorfields new Database API]. 68 1. If you call generic views from your views, [wiki:RemovingTheMagic#Changedtheparametersyoupasstogenericviews update their parameters]: remove {{{app_label}}} and {{{model_name}}}, add {{{queryset}}}. 68 1. If you call generic views from your views: 69 * [wiki:RemovingTheMagic#Changedtheparametersyoupasstogenericviews Update their parameters]: remove {{{app_label}}} and {{{model_name}}}, add {{{queryset}}}. 70 * If you pass a {{{template_name}}} argument, [wiki:RemovingTheMagic#Includetemplateextensionexplicitly add the explicit template extension]. 69 71 1. If you use Django's authentication, [wiki:RemovingTheMagic#Authenticationhasbeenconsolidated update your code to reflect the consolidation]. 70 72 1. If you use manipulators, [wiki:RemovingTheMagic#Changedinterfacetomanipulators update your code]: {{{django.core.formfields}}} is {{{django.forms}}} now. 73 1. If you use the syndication framework, [wiki:RemovingTheMagic#Includetemplateextensionexplicitly specify .html extension for slug templates explicitly]. 71 74 1. If you use raw database connections, [wiki:RemovingTheMagic#Databaseconnectionrelocated/renamed update your code]. 72 75 1. The {{{packages}}} module [wiki:RemovingTheMagic#Thepackagesmoduleisnomore has been removed]. … … 88 91 1. [wiki:RemovingTheMagic#RemovedSilentVariableFailureexception SilentVariableFailure exception was removed]: use {{{silent_variable_failure}}} attribute instead. 89 92 1. Update your code to reflect model changes you did in the [wiki:MagicRemovalCheatSheet#Models Models section] above, if applicable. 93 1. If you create a template tag via {{{inclusion_tag()}}}, [wiki:RemovingTheMagic#Includetemplateextensionexplicitly specify its extension explicitly]. 90 94 1. If your template tag implements a high-level view-like functionality, apply changes outlined in the [wiki:MagicRemovalCheatSheet#Views Views section] above. 91 95 … … 93 97 94 98 1. Update {{{urls.py}}}: 95 1. Admin URLConf was [wiki:RemovingTheMagic#MovedadminURLconftoshortenitspath relocated :99 1. Admin URLConf was [wiki:RemovingTheMagic#MovedadminURLconftoshortenitspath relocated]: 96 100 * {{{django.contrib.admin.urls.admin}}} => {{{django.contrib.admin.urls}}} 97 101 1. [wiki:RemovingTheMagic#Changedtheparametersyoupasstogenericviews Change the parameters you pass to generic views]: remove {{{app_label}}} and {{{model_name}}}, add {{{queryset}}}. 102 1. If you pass a {{{template_name}}} argument to generic views, [wiki:RemovingTheMagic#Includetemplateextensionexplicitly add the explicit template extension]. 98 103 1. Update {{{settings.py}}}: 99 104 1. Update {{{TEMPLATE_LOADERS}}} to reflect [wiki:RemovingTheMagic#Namespacesimplification Namespace simplification]: remove {{{core}}} from their names. … … 113 118 1. If you rely on {{{request.user}}} [wiki:RemovingTheMagic#request.userisnowsetviamiddleware anywhere in your code], modify {{{MIDDLEWARE_CLASSES}}}: 114 119 * Add {{{django.contrib.auth.middleware.AuthenticationMiddleware}}} anywhere after {{{django.contrib.sessions.middleware.SessionMiddleware}}}. 120 1. Remove {{{TEMPLATE_FILE_EXTENSION}}} --- [wiki:RemovingTheMagic#Includetemplateextensionexplicitly it's not used anymore]. 115 121 116 122 == Post-conversion ==