Closed ndarville closed 12 years ago
Settle for a dialled-down version, until I figure out the Django back-end configuration
language: python
python:
- 2.6
- 2.7
install:
- pip install -r requirements.txt --use-mirrors
- pip install pep8 --use-mirrors
before_script:
- pep8 --exclude=migrations --ignore=E501,E225 forum, _postinstall
pep8 --select=X000 dir
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'template1',
'USER': env['DOTCLOUD_DB_SQL_LOGIN'],
'PASSWORD': env['DOTCLOUD_DB_SQL_PASSWORD'],
'HOST': env['DOTCLOUD_DB_SQL_HOST'],
'PORT': int(env['DOTCLOUD_DB_SQL_PORT']),
},
'travis': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ponydb',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
manage.py syncdb --database=travis
import os
if 'TRAVIS' in os.environ:
DATABASE = ...
Python config: http://about.travis-ci.org/docs/user/languages/python/. Database config: http://about.travis-ci.org/docs/user/database-setup/. More config: http://about.travis-ci.org/blog/august-2012-upcoming-ci-environment-updates/. Env vars: http://about.travis-ci.org/docs/user/ci-environment/.
Problems importing wsgi.py
:
Traceback (most recent call last):
File "_postinstall/mkadmin.py", line 2, in <module>
from wsgi import *
ImportError: No module named wsgi
http://travis-ci.org/#!/ndarville/dotcloud-django/jobs/2261149 (dotcloud-django -> ponyforum)
For some reason, you have to define both the DJANGO_SETTINGS_MODULE
and PYTHONPATH
in order for the local set-up to work. The PYTHONPATH
is designated as your Django project dir, while the settings module is yourproject.settings
---sometimes yourproject.settings.work_environment
.
Merged in Pull Request #56: https://github.com/ndarville/dotcloud-django/pull/56.
travis.yml
in root