Issue #8 resolved

Error with Django 1.4

Marco Cellarosi
created an issue

In a particular Dajngo 1.4 folders structure, fagungis make a mistake..

in rungunicorn.sh it uses: {{{ cd %(django_project_root)s exec %(virtenv)s/bin/gunicorn_django -w %(gunicorn_workers)s \ --user=%(django_user)s --group=%(django_user_group)s \ --bind=%(gunicorn_bind)s --log-level=%(gunicorn_loglevel)s \ --log-file=%(gunicorn_logfile)s 2>>%(gunicorn_logfile)s

}}}

and in tasks.py it uses: {{{ with cd(env.django_project_root): virtenvrun('./manage.py syncdb --noinput --verbosity=1') }}}

The problem is that env.django_project_root is not the same directory in Django 1.4, because it divides the folder contains manage.py and root of project, where is also settings.py..

So you'll have fagungis returns an error running syndb or running the supervisor script, depending what folder is assigned to django_project_root in fabfile.py

The solution could be to add a not mandatory variable in fabfile, ex. project_root_settings.. If it's setted, you use that, else you can use old one.. in this way 1.3 and 1.4 version are supported.

Comments (1)

  1. Log in to comment