django-medusa
django-medusa copied to clipboard
work with AppConfigs in INSTALLED_APPS
Hi Mike,
I'm submitting this pull request because of trouble I had while using django medusa with Django 1.8. Django 1.7 added the concept of applications where you define an AppConfig
class. You have the option of using a path to the class in INSTALLED_APPS
, as explained in the docs:
Of course, you can also tell your users to put 'rock_n_roll.apps.RockNRollConfig' in their INSTALLED_APPS setting. You can even provide several different AppConfig subclasses with different behaviors and allow your users to choose one via their INSTALLED_APPS setting.
This is a problem in django_medusa.utils
because it assumes everything in INSTALLED_APPS
is a module path, not a class path. I worked around this, keeping the code almost entirely the same by using the django.apps.get_apps_config()
method to get a list of apps django has loaded from INSTALLED_APPS
and getting the string name of the module from there. From what I can tell this should be backwards compatible with Django < 1.7 but I have not used it that way myself.
I think the owner of this repo needs to hand it off to someone else to maintain. It's been months since there was any activity on master and I doubt seriously if any of these pull requests are going to get merged. I added static media collection in February, and not a single comment on it from the owner.
Due to the inactivity of this project I wrote this app https://github.com/fabiocaccamo/django-freeze
@fabiocaccamo I saw that the other day. Nice work!
@alsoicode thanks!