Changes between Version 12 and Version 13 of MagicRemovalCheatSheet

05/12/2006 02:12:15 AM (13 years ago)

added more checkpoints for explicit extensions


  • MagicRemovalCheatSheet

    v12 v13  
    6666 1. [wiki:RemovingTheMagic#RenamedDoesNotExistexception Rename DoesNotExist exception]: {{{people.PersonDoesNotExist}}} becomes {{{Person.DoesNotExist}}}.
    6767 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].
    6971 1. If you use Django's authentication, [wiki:RemovingTheMagic#Authenticationhasbeenconsolidated update your code to reflect the consolidation].
    7072 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].
    7174 1. If you use raw database connections, [wiki:RemovingTheMagic#Databaseconnectionrelocated/renamed update your code].
    7275 1. The {{{packages}}} module [wiki:RemovingTheMagic#Thepackagesmoduleisnomore has been removed].
    8891 1. [wiki:RemovingTheMagic#RemovedSilentVariableFailureexception SilentVariableFailure exception was removed]: use {{{silent_variable_failure}}} attribute instead.
    8992 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].
    9094 1. If your template tag implements a high-level view-like functionality, apply changes outlined in the [wiki:MagicRemovalCheatSheet#Views Views section] above.
    9498 1. Update {{{}}}:
    95    1. Admin URLConf was [wiki:RemovingTheMagic#MovedadminURLconftoshortenitspath relocated:
     99   1. Admin URLConf was [wiki:RemovingTheMagic#MovedadminURLconftoshortenitspath relocated]:
    96100     * {{{django.contrib.admin.urls.admin}}} => {{{django.contrib.admin.urls}}}
    97101   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].
    98103 1. Update {{{}}}:
    99104   1. Update {{{TEMPLATE_LOADERS}}} to reflect [wiki:RemovingTheMagic#Namespacesimplification Namespace simplification]: remove {{{core}}} from their names.
    113118   1. If you rely on {{{request.user}}} [wiki:RemovingTheMagic#request.userisnowsetviamiddleware anywhere in your code], modify {{{MIDDLEWARE_CLASSES}}}:
    114119     * 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].
    116122== Post-conversion ==
Back to Top