{% extends "base.html" %} {% load i18n %} {% load staticfiles %} {% load manager_extras %} {% block title %}{% trans "Get the code" %}{% endblock %} {% block content %}
{% blocktrans %}Click here to download the last stable version. For installation instructions see below.{% endblocktrans %}
{% blocktrans %}Get the development version if you want to contribute to the project, or simply want the latest of the latest. I probably don't need to tell you that this version will have more bugs and should not be used to keep important data, right?.{% endblocktrans %}
{% blocktrans %}There are two repositories you can clone:{% endblocktrans %}
hg clone https://bitbucket.org/rolandgeider/workout_manager
git clone https://github.com/rolandgeider/workout_manager.git
{% trans "Pull requests are welcome :)" %}
{% blocktrans %}This is a Django application, so refer for details to its documentation page if things don't go as expected.
{% endblocktrans %}{% blocktrans %}In short, these are the steps to perform for an installation on a linux or OS X machine, with python already installed. If you are using e.g. Windows, take a look at the link above.{% endblocktrans %}
{% blocktrans %}I personally like installing my development
files on a virtualenv, it helps keep the system more or less clean and are very
easy to set up, but you can skip this step if you don't mind installing all
dependencies system-wide (in that case, install django and the other applications
with a sudo
).{% endblocktrans %}
$ sudo apt-get install python-virtualenv
$ sudo apt-get install python-dev
$ virtualenv python-django
$ source python-django/bin/activate
{% blocktrans %}Get the application from PyPI.{% endblocktrans %}
$ pip install wger
{% trans "Initialise and start the application." %}
$ wger
{% blocktrans %}The script will, on first run, create a configuration file. For this it will ask you for your reCaptcha keys. You can leave this blank or enter bogus data, but you won't be able to register new users or use the demo account. For the sitemap.xml file to be correctly generated, you need to set a correct domain name in the sites app. This is done via django's admin interface. A sqlite database will also be created with a standard superuser:{% endblocktrans %}
{% blocktrans %}You can later call wger again to simply start the application.{% endblocktrans %}
{% blocktrans %}If you don't want to use the sqlite database that main.py creates or if you want to run this under another setup (e.g. under apache), you can install the individual component individually.{% endblocktrans %}
{% blocktrans %}First, install all packages:{% endblocktrans %}
$ pip install -r requirements.txt
{% blocktrans %}Copy the sample configuration file and change the settings there as appropriate. There is another configuration file, settings_global.py that contains other global settings. Setup any database that Django supports, initialise the tables and create a super user.{% endblocktrans %}
$ hg clone https://bitbucket.org/rolandgeider/workout_manager
$ cd workout_manager
$ python manage.py syncdb
{% blocktrans %}Now you are ready to go, the application is installed and can be used. However, an application like this without data is not interesting, so you should load some initial data to populate the categories, etc.{% endblocktrans %}
{% blocktrans %}For this, load these fixtures, in this order, as some dependend on each other (specially the languages). The ingrediens fixture can take some time to process, it contains more than 8000 entries.{% endblocktrans %}
$ python manage.py loaddata languages
$ python manage.py loaddata days_of_week
$ python manage.py loaddata muscles
$ python manage.py loaddata categories
$ python manage.py loaddata exercises
$ python manage.py loaddata ingredients
{% blocktrans %}Now, run the server:{% endblocktrans %}
$ python manage.py runserver
{% blocktrans %}You can now access the site with your browser:{% endblocktrans %}
http://localhost:8000/
{% blocktrans %}If you want to run this in production, don't use django's builtin server, use apache, gunicorn or some other real server. Refer to the deployment section on django's documentation for details here. You will also have to take special care of the static files.{% endblocktrans %}
{% endblock %}