samluescher / django-form-designer

A Django admin app with a GUI to create complex forms without any programming skills; complete with logging, validation, and redirects.
BSD 3-Clause "New" or "Revised" License
315 stars 149 forks source link

Migration fails to load models - Django 1.8.5 Django-CMS 3.1 #98

Open source3 opened 8 years ago

source3 commented 8 years ago

The following error occurs running 'python manage.py migrate'. Upgrading from Django 1.5/django-cms 2.4. I tired migrating from south as explained in https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south and https://docs.djangoproject.com/en/1.8/topics/migrations/#libraries-third-party-apps. Did not work. Same error.

Any suggestions or solutions is much appreciated.

Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/core/management/init.py", line 351, in execute_from_command_line utility.execute() File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/core/management/init.py", line 325, in execute django.setup() File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/form_designer/contrib/cms_plugins/form_designer_form/models.py", line 1, in from form_designer.models import FormDefinition File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/form_designer/models.py", line 19, in User = get_user_model() File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/contrib/auth/init.py", line 150, in get_user_model return django_apps.get_model(settings.AUTH_USER_MODEL) File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/apps/registry.py", line 199, in get_model self.check_models_ready() File "/ebs/localdealsmagazine/local/lib/python2.7/site-packages/django/apps/registry.py", line 131, in check_models_ready raise AppRegistryNotReady("Models aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

settings.py: INSTALLED_APPS = ( ... 'picklefield', 'form_designer.contrib.cms_plugins.form_designer_form', 'form_designer',
... )

MIDDLEWARE_CLASSES = ( ... 'form_designer.middleware.RedirectMiddleware', )

source3 commented 8 years ago

Fixed. Warning, I have not fully tested the fix below.

Django 1.8

Then ran 'python mange.py makemigrations' then 'python migrate.py form_designer'.

I submitted patches for the above files. Not to good with github so I hope I proposed the changes correctly.

andreav commented 8 years ago

Same here. Django==1.8.7 + django-cms==3.2.0

Any chance the patch will be merged? Thanks.

theblackcat102 commented 7 years ago

Same here, Please merge the patch as soon as possible

barseghyanartur commented 7 years ago

Guys, seriously, don't you see the project is dead? Last commit has been done about 3 years ago (same goes for the last issue closed). Either (1) fork and register on PyPI under different name or (2) switch to another package.