I don't think so... The line I am getting hung up on is: class Project(models.Model): ...... def approved_projects(): return Project.objects.filter(approved=True)
It seems that no matter how many things I remove from my URLs, if there is any reference to any model on the first build, it'll fail to migrate. On Friday, April 8, 2016 at 7:26:04 AM UTC-4, Tim Graham wrote: > > Difficult for me to say for sure without having a sample project to debug. > Do you know if you have any module level queries in your project? Those are > generally to be avoided and may cause problems like this. See > https://groups.google.com/d/topic/django-developers/7JwWatLfP44/discussion > for some discussion. > > On Thursday, April 7, 2016 at 8:17:23 PM UTC-4, SillyInventor wrote: >> >> I am trying to transition to Django 1.9 from my 1.8 app. Simply creating >> the migrations for old databases is fine, but when I try to create a fresh >> database with migrate I get: >> >> "Error creating new content types. Please make sure contenttypes " >> RuntimeError: Error creating new content types. Please make sure >> contenttypes is migrated before trying to migrate apps individually. >> >> I have tested this a fair bit, and I can get it to build fresh if I: >> remove my site from URLs, migrate, add it back, and migrate again... but >> that's super janky, and not the clean build I am looking for. It seems to >> be caused because in Django/core/management/base.py line 398 -> >> self.check() is called before the migration occurs, and the lack of a >> database throws an error and quits before setting up the database (catch >> 22). I have tested this by commenting this out, and that will also allow it >> to build the database. >> >> Anyone have any recommendations for what a good way to fix this is or >> what the underlying problem might be in my app? >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13be1e7c-ce44-468a-824f-883ba88caea6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.