===== Setup ===== Requirements ------------ * `Python 2.7 `_ * Python requiremets: ``pip install -r requirements.txt`` * a library for your database of choice (see `DBs supported by Django `_) * `Sass `_ >= 3.2 for parsing SCSS stylesheets * Librarian (bundled as a git submodule, remember to ``git submodule update --init`` * Librarian has more dependencies if you want to build PDF and MOBI files, see lib/librarian/README.md * `Solr `_ server if you want to search Running ------- Set up the database with:: ./manage.py syncdb --migrate Run the dev server with:: ./manage.py runserver Some tasks (like generating e-books) run in a seperate Celery process by default, so you'll also need to run:: celery -A wolnelektury worker --loglevel=INFO Or, if you don't want to run a separate Celery daemon, set this in your ``localsettings.py``:: CELERY_ALWAYS_EAGER = True Deployment ---------- Setup your server in fabfile.py and do:: fab deploy Initial deploy will stop and ask you to provide a localsettings.py file. A sample localsettings.py will be put on your server, as well as sample configuration for `Nginx `_, `Gunicorn `_ and `Supervisord `_. Publishing books ---------------- Books are represented as XML files. You can import XML files from a directory by running:: ./manage.py importbooks ../books Or you can publish a single XML by using publishing form in admin, or the publishing API.