Using Django Settings Inside a Fabric File

I would like to iterate through INSTALLED_APPS in the Django settings file as follows:

@task def test_app print settings.INSTALLED_APPS 

How do I access my settings file in a fabfile?

Thanks.

+7
source share
1 answer

He documented: http://docs.fabfile.org/en/latest/api/contrib/django.html

 from fabric.contrib import django django.settings_module('myproject.settings') from django.conf import settings 
+14
source

All Articles