Changes between Version 28 and Version 29 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
11/10/2005 10:55:29 PM (10 years ago)
Author:
adrian
Comment:

Split into redirects and flatfiles sections

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v28 v29  
    253253}}}
    254254
    255 ==== If you do want to use flatfiles and redirects ====
     255==== If you want to use flatfiles ====
    256256
    257257 * Execute the following SQL:
    258258   {{{
    259    ALTER TABLE redirects RENAME TO django_redirects;
    260259   ALTER TABLE flatfiles RENAME TO django_flatpages;
    261260   ALTER TABLE flatfiles_sites RENAME TO django_flatpages_sites;
     
    264263   UPDATE content_types SET package = 'flatpages', python_module_name = 'flatpages' WHERE package = 'core' AND python_module_name = 'flatfiles';
    265264   UPDATE auth_permissions SET package = 'flatpages' WHERE package = 'core' AND codename IN ('add_flatfile', 'change_flatfile', 'delete_flatfile');
    266    INSERT INTO packages (label, name) VALUES ('redirects', 'redirects');
    267    UPDATE content_types SET package = 'redirects', python_module_name = 'redirects' WHERE package = 'core' AND python_module_name = 'redirects';
    268    UPDATE auth_permissions SET package = 'redirects' WHERE package = 'core' AND codename IN ('add_redirect', 'change_redirect', 'delete_redirect');
    269    }}}
    270  * If you're using PostgreSQL, execute this SQL:
    271    {{{
    272    ALTER TABLE redirects_id_seq RENAME TO django_redirects_id_seq;
    273    ALTER TABLE django_redirects ALTER COLUMN id DROP DEFAULT;
    274    ALTER TABLE django_redirects ALTER COLUMN id SET DEFAULT nextval('public.django_redirects_id_seq'::text);
     265   }}}
     266 * If you're using PostgreSQL, execute this additional SQL:
     267   {{{
    275268   ALTER TABLE flatfiles_id_seq RENAME TO django_flatpages_id_seq;
    276269   ALTER TABLE django_flatpages ALTER COLUMN id DROP DEFAULT;
     
    281274 * If you use the URLconf {{{django.conf.urls.flatfiles}}}, now point to {{{django.contrib.flatpages.urls}}}.
    282275 * If you have a {{{USE_FLAT_PAGES}}} setting, remove it.
     276 * Add {{{"django.contrib.flatpages"}}} to your {{{INSTALLED_APPS}}}.
     277 * Add {{{"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware"}}} to your {{{MIDDLEWARE_CLASSES}}}.
     278
     279==== If you want to use redirects ====
     280
     281 * Execute the following SQL:
     282   {{{
     283   ALTER TABLE redirects RENAME TO django_redirects;
     284   INSERT INTO packages (label, name) VALUES ('redirects', 'redirects');
     285   UPDATE content_types SET package = 'redirects', python_module_name = 'redirects' WHERE package = 'core' AND python_module_name = 'redirects';
     286   UPDATE auth_permissions SET package = 'redirects' WHERE package = 'core' AND codename IN ('add_redirect', 'change_redirect', 'delete_redirect');
     287   }}}
     288 * If you're using PostgreSQL, execute this additional SQL:
     289   {{{
     290   ALTER TABLE redirects_id_seq RENAME TO django_redirects_id_seq;
     291   ALTER TABLE django_redirects ALTER COLUMN id DROP DEFAULT;
     292   ALTER TABLE django_redirects ALTER COLUMN id SET DEFAULT nextval('public.django_redirects_id_seq'::text);
     293   }}}
     294 * Add {{{"django.contrib.redirects"}}} to your {{{INSTALLED_APPS}}}.
     295 * Add {{{"django.contrib.redirects.middleware.RedirectFallbackMiddleware"}}} to your {{{MIDDLEWARE_CLASSES}}}.
Back to Top