4

I am using Django 1.4.3 and have several sites built using Django-CMS 2.3.5. I want to upgrade them to Django-CMS 2.4.1, so that I can then start to move to Django 1.5.

When I type ./manage runserver from a virtualenv with Django-CMS 2.3.5, all works fine. When I move to a virtualenv with Django-CMS 2.4.1, but otherwise the same, none of my pages can be accessed.

In the admin panel, they all have the name None. If I edit one, the screen shows them with the correct name and all the plugins there. If I try to save the page, the info all disappears, including the name and slug and plugins, and I get a message at the top asking me to fix the below errors (of which there are none). I can press "publish draft", but the browser cannot find any page but /, and this has no plugins on it (and it still has name None in the admin panel).

If I try to add a new plugin, I get an alert saying <django.utils.functional.__proxy__ object at 0x1067a9e90>.

I am not using the MultilingualURLMiddleware middleware, and have USE_I18N = False.

I added 'django.middleware.locale.LocaleMiddleware' to MIDDLEWARE_CLASSES anyway (but it doesn't help if I do not).

I typed ./manage.py migrate, ./manage cms fix-mptt and for good measure ./manage.py cms delete_orphaned_plugins as well.

How do I keep my pages when I migrate to the new version of Django-CMS?

thanks

Racing Tadpole
  • 4,270
  • 6
  • 37
  • 56

2 Answers2

2

Here are upgrade instruction.

I think your problem is in new style CMS_LANGUAGES.

Try to set:

USE_I18N = True    
CMS_LANGUAGES = {
    1: [
        {
            'code': 'en',
            'name': gettext('English'),
            'public': True,
            },
        ],
    'default': {
        'fallbacks': ['en',],
        'public': False,
        }
}

Also run ./manage.py cms check to checking django CMS installation

WebPal
  • 818
  • 8
  • 16
  • That has fixed it! (once I have gone in and published each page again). I thought I could shortcut the instructions by keeping USE_I18N=False, but it seems not. My site now has en/ in the URL, which it didn't before, but that's not a big problem, and I assume there's a way to get rid of that. Very much appreciated!! – Racing Tadpole May 16 '13 at 07:14
  • try instead to set LANGUAGE_CODE to "en" instead of "en-us" – digi604 May 20 '13 at 20:19
0

The most crucial thing I've ever learnt in django was taking manuel backup of the project.db before any migration process done by manage.py.

cagcak
  • 3,894
  • 2
  • 21
  • 22