# HG changeset patch # User Brian Neal # Date 1428368545 18000 # Node ID 0365fdbb4d78bcf073375c8e96e2c35bc9317042 # Parent 1cb227d59e2089f8ca7fc7fbbc4449e2312224c9 Fix app conflict with messages. Django's messages app label conflicts with our messages app. We can't easily rename our label as that will make us rename database tables. Since our app came first we'll just customize Django messages label. For Django 1.7.7 upgrade. diff -r 1cb227d59e20 -r 0365fdbb4d78 messages/apps.py --- a/messages/apps.py Mon Apr 06 19:36:38 2015 -0500 +++ b/messages/apps.py Mon Apr 06 20:02:25 2015 -0500 @@ -1,6 +1,6 @@ from django.apps import AppConfig + class MessagesConfig(AppConfig): name = 'messages' verbose_name = 'Private Messages' - label = 'private_messages' diff -r 1cb227d59e20 -r 0365fdbb4d78 sg101/apps.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sg101/apps.py Mon Apr 06 20:02:25 2015 -0500 @@ -0,0 +1,8 @@ +from django.contrib.messages.apps import MessagesConfig + + +# The Django messages app conflicts with our own messages app. +# Override the label to fix this. + +class DjangoMessagesConfig(MessagesConfig): + label = 'django_messages' diff -r 1cb227d59e20 -r 0365fdbb4d78 sg101/settings/base.py --- a/sg101/settings/base.py Mon Apr 06 19:36:38 2015 -0500 +++ b/sg101/settings/base.py Mon Apr 06 20:02:25 2015 -0500 @@ -103,7 +103,7 @@ 'django.contrib.contenttypes', 'django.contrib.flatpages', 'django.contrib.humanize', - 'django.contrib.messages', + 'sg101.apps.DjangoMessagesConfig', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles',