For some reason silver run $(DNS) -vvvv manage.py loaddata [fixture]
does
not work as expected. I now I use [app_name]/fixtures/initial_data.json
which gets loaded during syncdb. Not the same but works.
Somethings like this in settings.py helps finding fixtures:
OUR_ROOT = os.path.dirname(os.path.realpath(__file__))
FIXTURE_DIRS = (os.path.join(OUR_ROOT, 'fixtures'),)
silver run
seems only be able to run python commands, nothing else.
If you have Python libraries installed in a system-wide location and not with virtualenv they might not be installed on the server. Before deploying do something like
../../bin/pip install -I -r ./requirements.txt
to ensure everythong is installed. -I
is the important parameter here.
To get started you might want to use SQLite - less moving parts. Put something like this into your settings.py:
OUR_ROOT = os.path.dirname(os.path.realpath(__file__))
FILE_STORAGE = os.environ.get('CONFIG_FILES', OUR_ROOT)
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(FILE_STORAGE, 'www.db')
Your Database will be somewhere at ~/.silverlining-app-data/files/
Remember that mixed case in PostgreSQL is difficult. If your appname is mixed case expect issues.
If your settings.py
seem to have no effect, the server may import the wrong
settings.py
. Try
echo "import os, sys
OUR_ROOT = os.path.dirname(os.path.realpath(__file__))
sys.path = [os.path.realpath(os.path.join(OUR_ROOT, '../../src/$PROJECT-src'))] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
" > lib/python/silvercustomize.py
where $PROJECT
should be your Project name. This ensures settings.py in your
project are found first.
http://github.com/hudora/hd_django_project_template/blob/master/silver-build-layout.sh is an example how to set up an development environment.
Silverlining automatically strips www of the beginning URLs. So make sure www.example.com and example.com point to the same host.
silver setup-node
tries to use the keys id_rsa.pub
and id_dsa.pub
and install the first one found on the server.