Did I find the right examples for you? yes no

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Return the current project path site/project 

        def get_project_root():
    """ Return the current project path site/project """
    from django.conf import settings
    settings_file = os.sys.modules[settings.SETTINGS_MODULE].__file__
    return os.path.dirname(os.path.normpath(settings_file))
        


src/c/o/confine-controller-0.10.5/controller/management/commands/setupnginx.py   confine-controller(Download)
from django.utils.six.moves import input
 
from controller.utils.paths import get_project_root, get_site_root, get_project_name
from controller.utils.system import run, check_root, get_default_celeryd_username
 
        context = {
            'project_name': get_project_name(),
            'project_root': get_project_root(),
            'site_root': get_site_root(),
            'media_root': settings.MEDIA_ROOT,

src/c/o/confine-controller-0.10.5/controller/management/commands/setupapache.py   confine-controller(Download)
from django.utils.six.moves import input
 
from controller.utils.paths import get_project_root, get_site_root, get_project_name
from controller.utils.system import run, check_root, get_default_celeryd_username
 
        context = {
            'project_name': get_project_name(),
            'project_root': get_project_root(),
            'site_root': get_site_root(),
            # TODO end with single /

src/c/o/confine-controller-0.10.5/controller/management/commands/setuppostgres.py   confine-controller(Download)
from django.core.management.base import BaseCommand
 
from controller.utils.paths import get_project_root
from controller.utils.system import run, check_root
 
        run('su postgres -c "psql -c \\"CREATE DATABASE %(db_name)s OWNER %(db_user)s;\\""' % context, err_codes=[0,1])
 
        context.update({'settings': os.path.join(get_project_root(), 'settings.py')})
 
        if run("grep 'DATABASES' %(settings)s" % context, err_codes=[0,1]).return_code == 0:

src/c/o/confine-controller-0.10.5/controller/utils/options.py   confine-controller(Download)
 
from controller.core.exceptions import OperationLocked
from controller.utils.paths import get_project_root
from controller.utils.system import run, touch
 
    for name, value in options.iteritems():
        if getattr(settings, name, None) != value:
            settings_file = os.path.join(get_project_root(), 'settings.py')
            context = {
                'name': name,