Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

        def root():
    paas_prov = provider.detect()
    if paas_prov == provider.HEROKU:
        return 'staticfiles'
    if paas_prov == provider.GONDOR:
        return os.path.join(os.environ['GONDOR_DATA_DIR'], 'site_media',
                            'static')
    if paas_prov == provider.DOTCLOUD:
        return '/home/dotcloud/volatile/static/'
    return 'wsgi/static'
        


src/c/o/cookiecutter-django-paas-HEAD/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/settings.py   cookiecutter-django-paas(Download)
)
from dj_paas_env import static
STATIC_ROOT = static.root()
 

src/d/j/dj-paas-env-0.6.1/dj_paas_env/test.py   dj-paas-env(Download)
    def test_root_heroku(self, mock):
        self.assertEqual(static.root(), 'staticfiles')
 
    @patch('dj_paas_env.provider.detect', return_value=provider.OPENSHIFT)
    def test_root_openshift(self, mock):
        self.assertEqual(static.root(), 'wsgi/static')
    def test_root_gondor(self, mock):
        os.environ['GONDOR_DATA_DIR'] = 'zxcvb'
        self.assertEqual(static.root(), os.path.join('zxcvb', 'site_media',
                                                     'static'))
 
    @patch('dj_paas_env.provider.detect', return_value=provider.DOTCLOUD)
    def test_root_dotcloud(self, mock):
        self.assertEqual(static.root(), '/home/dotcloud/volatile/static/')
    def test_root_unknown(self, mock):
        self.assertEqual(static.root(), 'wsgi/static')
 
 
class TestProviderDetect(SafeEnvironmentTestCase):