Repository: stephenmcd/mezzanine

Issue #1255: django-contrib-comments is not ready for Django 1.8
Created: 2015-04-08T02:37:42Z
I've done more testing with Django 1.8, and I've hit an error when using Postgres databases (you won't see it with SQLite, and I can't comment on MySQL): The problem arises when createdb runs migrate.
django-contrib-comments seems to be the offender so I went ahead and created a project with it in vanilla Django 1.8, and I get the same error when running migrate. So yeah, this is an upstream issue and I have reported it over there. I'm opening it here to start discussion on how to proceed, as this might be a release blocker, and raise awareness in case we can contribute an upstream fix (which would be awesome!).

Duplicate issue #1264: "python manage.py createdb --noinput" fails when using postgres
Created: 2015-04-12T10:02:11Z
"python manage.py createdb --noinput" fails when using postgres and mezzanine from the master development branch.
What does work, is if I uncomment all mezzanine apps, then migrate, then uncomment mezzanine apps and then migrate again. Sqlite works fine as well.
$ python manage.py createdb --noinput
/var/virtualenvs/mezztest/src/mezzanine/mezzanine/utils/conf.py:51: UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django requires. Will fall back to the domains configured as sites.
warn("You haven't defined the ALLOWED_HOSTS settings, which "
/var/virtualenvs/mezztest/src/mezzanine/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Europe/Amsterdam
warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
/var/virtualenvs/mezztest/src/mezzanine/mezzanine/utils/importing.py:6: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django_comments/models.py:2: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
from django.contrib.contenttypes import generic
/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django_comments/models.py:46: RemovedInDjango19Warning: Model class django_comments.models.Comment doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class Comment(BaseCommentAbstractModel):
/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django_comments/models.py:165: RemovedInDjango19Warning: Model class django_comments.models.CommentFlag doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class CommentFlag(models.Model):
/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django_comments/forms.py:3: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
from django.forms.util import ErrorDict
System check identified some issues:
WARNINGS:
core.SitePermission.user: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
HINT: ForeignKey(unique=True) is usually better served by a OneToOneField.
Operations to perform:
Synchronize unmigrated apps: django_comments, staticfiles, boot, filebrowser_safe, sitemaps, grappelli_safe
Apply all migrations: core, redirects, sessions, admin, twitter, galleries, sites, auth, blog, generic, contenttypes, conf, forms, pages
Synchronizing apps without migrations:
Creating tables...
Creating table django_comments
Creating table django_comment_flags
Running deferred SQL...
Traceback (most recent call last):
File "manage.py", line 34, in 
execute_from_command_line(sys.argv)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/init.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(_args, *_cmd_options)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(_args, *_options)
File "/var/virtualenvs/mezztest/src/mezzanine/mezzanine/core/management/commands/createdb.py", line 60, in handle
interactive=self.interactive)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/init.py", line 120, in call_command
return command.execute(_args, *_defaults)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(_args, *_options)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 179, in handle
created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 317, in sync_apps
cursor.execute(statement)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/db/utils.py", line 97, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/var/virtualenvs/mezztest/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "django_content_type" does not exist

Closing comment (2015-04-12T10:11:44Z): Thanks - but duplicate of #1255 #1262 and django/django-contrib-comments#30