django-medusa icon indicating copy to clipboard operation
django-medusa copied to clipboard

work with AppConfigs in INSTALLED_APPS

Open brad opened this issue 9 years ago • 4 comments

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.

brad avatar May 22 '15 00:05 brad

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.

alsoicode avatar May 22 '15 00:05 alsoicode

Due to the inactivity of this project I wrote this app https://github.com/fabiocaccamo/django-freeze

fabiocaccamo avatar Oct 22 '15 17:10 fabiocaccamo

@fabiocaccamo I saw that the other day. Nice work!

alsoicode avatar Oct 22 '15 17:10 alsoicode

@alsoicode thanks!

fabiocaccamo avatar Oct 23 '15 11:10 fabiocaccamo