Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My settings.py

if ON_OPENSHIFT:
     DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'django',
            'USER': 'USER',
            'PASSWORD': 'PASS',
            'HOST': '127.2.202.129',
            'PORT': '3306',
        }
    }

and my action_hooks/deploy

source $OPENSHIFT_APP_DIR/virtenv/bin/activate
export PYTHON_EGG_CACHE=$OPENSHIFT_APP_DIR/virtenv/lib/python-2.6

echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/my/manage.py syncdb --noinput'"
python $OPENSHIFT_REPO_DIR/wsgi/my/manage.py syncdb --noinput

echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/my/manage.py collectstatic --noinput'"
python $OPENSHIFT_REPO_DIR/wsgi/my/manage.py collectstatic --noinput

and whenever i do,

git add .
git commit -a -m "project"
git push

my database shows no tables...why??
THANKS iin advance

share|improve this question
    
Are you getting errors in the output of git push? Another thing would be to try running those commands directly on the application gear. –  Sumana Mehta Jun 5 '13 at 19:25
    
can u direct, where @ application gear –  Sarvesh Gupta Jun 5 '13 at 19:34
add comment

1 Answer

Read this and you will understand a lot more about Django on OpenShift

http://appsembler.com/blog/django-deployment-using-openshift/

share|improve this answer
    
sir, i have tried that, but I think my deploy script is not running while git push, How to know is that running or not –  Sarvesh Gupta Jun 6 '13 at 6:03
    
Did you git add it? ``git add -a . –  TheSteve0 Jun 10 '13 at 14:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.