Hi all

I'm writing a small library which will be bundled together with a
pluggable django app.

The app provides a bunch of different AppConfig instances, the end
user chooses one and pops it in their INSTALLED_APPS:

  INSTALLED_APPS += [ 'foo_lib.contrib.django_app.configs.FooAppConfig', ]

All the AppConfigs have their name attribute set to "foo_lib", they
have their path attribute set to the directory containing models.py
and there is a default AppConfig

I have a test project that I'm using to run "makemigrations" and so
on. With INSTALLED_APPS as above, django cannot find any changes for
"foo_lib". If I supply the dotted path to the appconfig to
"makemigrations", I am told:

   "App 'foo_lib.contrib.django.configs.FooAppConfig' could not be
found. Is it in INSTALLED_APPS?"

which is quite amusing.

If I replace the path to the appconfig with the dotted path to the
module, and then use "makemigrations django_app", then the migrations
get created, but obviously that seriously sucks.

Furthermore, even with the migration files in place, they are not
actually acted upon when running migrate or tests.


What is the correct way to do this?

Cheers

Tom

-- 
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/CAFHbX1JH2Y2WJrriCrs0x6eH4Le3cVsTR19jYRDzxEw70-C6FA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to