Self hosted FLOSS fitness/workout, nutrition and weight tracker
Update the installation instructions and remove the i18n tags
Roland Geidera5a7075cc4a6
diff --git a/README.rst b/README.rstindex 38a33c1cd..64f53d68d 100644--- a/README.rst+++ b/README.rst@@ -9,7 +9,7 @@ Installation============These are the basic steps to get the application running. There are more-detailed installation instructions on http://wger.de/en/software/code+detailed installation instructions on http://wger.de/software/code1) Install the necessary packages and their dependencies@@ -59,12 +59,10 @@ The available options for the ``wger`` command are ::Contact=======-Feel free to write to the mailing list (https://groups.google.com/group/wger),-to twitter (https://twitter.com/wger_de) or to me directly-(``roland @ geider.net``) if you found this useful or if there was something-that didn't behave as you expected. Alternatively, you can also open a ticket-on the issue tracker:-https://github.com/rolandgeider/wger/issues+Feel free to write to the mailing list (https://groups.google.com/group/wger)+or twitter (https://twitter.com/wger_de) if you found this useful or if there+was something that didn't behave as you expected. Alternatively, you can also+open a ticket on the issue tracker: https://github.com/rolandgeider/wger/issuesSourcesdiff --git a/wger/manager/static/css/yaml401/custom-yaml.css b/wger/manager/static/css/yaml401/custom-yaml.cssindex e66180310..114635929 100644--- a/wger/manager/static/css/yaml401/custom-yaml.css+++ b/wger/manager/static/css/yaml401/custom-yaml.css@@ -159,9 +159,10 @@ footer{code{white-space: pre;+ color: rgb(70, 0, 0);}.ym-form input[type="submit"]{font-family: "Open Sans", Arial, Helvetica, sans-serif;-}\ No newline at end of file+}diff --git a/wger/software/templates/code.html b/wger/software/templates/code.htmlindex 6564d5f1c..3357b32e1 100644--- a/wger/software/templates/code.html+++ b/wger/software/templates/code.html@@ -76,50 +76,56 @@ if things don't go as expected.{% endblocktrans %}</li><a name="developer-guide"></a>-<h2>{% trans "Developer guide" %}</h2>+<h2>Developer guide</h2><a name="get-code"></a>-<h3>{% trans "How to get the code" %}</h3>-<p>{% blocktrans %}The code is hosted both on github and on bitbucket. If+<h3>How to get the code</h3>+<p>The code is hosted both on github and on bitbucket. Ifyou are unfamiliar with mercurial or git, take a look at <a href="http://hginit.com/">HGinit</a> or <a href="http://git-scm.com/book">Pro Git</a>. Both repositoriesare mantained in sync, so you should be able to work on either one (issues-are only collected in github).{% endblocktrans %}</p>+and pull requests are only collected in github).</p><p><a class="btn btn-primary" href="https://github.com/rolandgeider/wger">github (GIT) »</a>- {% trans "the main repository. All work happens here." %}<br>+ the main repository. All work happens here<br><code>git clone https://github.com/rolandgeider/wger.git</code></p><p><a class="btn btn-primary" href="https://bitbucket.org/rolandgeider/wger">bitbucket (HG) »</a>- {% trans "a mirror of the main repo." %}<br>+ a mirror of the main repo<br><code>hg clone https://bitbucket.org/rolandgeider/wger</code></p>-<p>{% blocktrans %}The file structure you get once you clone the repo should-be self explaining:{% endblocktrans %}</p>+<p>The file structure you get once you clone the repo should be self explaining:</p><ul>- <li>{% blocktrans %}<strong>wger:</strong> the django project and its applications{% endblocktrans %}</li>- <li>{% blocktrans %}<strong>tests:</strong> the tests folder. This actually only-imports the individial tests from each application and makes it easier to test-all of them.{% endblocktrans %}</li>- <li>{% blocktrans %}<strong>extras:</strong> additional scrips, a benchmarking-script with funkload and a simple tool to create a local settings.py-file.{% endblocktrans %}</li>+ <li>+ <strong>wger:</strong> the django project and its applications+ </li>+ <li>+ <strong>tests:</strong> the tests folder. This actually only imports+ the individial tests from each application and makes it easier to test+ all of them.+ </li>+ <li>+ <strong>extras:</strong> additional helper scrips, e.g. a benchmarking+ script with funkload, a tool to create a local settings.py file, etc.+ </li></ul>-<a name="get-started"></a>-<h3>{% trans "How to get started" %}</h3>-<p>{% blocktrans %}The installation procedure is very similar to the one-described above. The notes and infos there also apply, so read that section-too. First, install all packages:{% endblocktrans %}</p>+<h3>How to get started</h3>+<p>The installation procedure is very similar to the one+described above for the packaged version. The notes and infos there also apply,+so read that section too. First, install all packages (note that you might need+to install more packages if you want the thumbnailer to be able to read more+image formats, consult the documentation <a href="http://pillow.readthedocs.org">for pillow</a>+for more details):</p><code>$ sudo apt-get install python-virtualenv@@ -129,7 +135,7 @@ $ source python-django/bin/activate$ pip install -r requirements.txt</code>-<p>{% blocktrans %}Get the code and create a superuser:{% endblocktrans %}</p>+<p>Get the code, create a superuser and start the webserver:</p><code>$ git clone https://github.com/rolandgeider/wger.git@@ -137,62 +143,118 @@ $ cd wger$ python start.py</code>-<p>{% blocktrans %}That's it. You can either start the server again with+<p>That's it. You can either start the server again with<code>start.py</code> or do it the django way with-<code>python manage.py runserver</code>.{% endblocktrans %}</p>+<code>python manage.py runserver</code>.</p>-<p>{% blocktrans %}If you pull updates and there were database changes, you-can apply them with a simple <code>python manage.py migrate --all</code>.{% endblocktrans %}</p>+<p>If you pull updates and there were database changes, you+can apply them with a simple <code>python manage.py migrate --all</code>.</p>+<h4>Management commands</h4>+<p>wger also implements a series of django commands that perform different+management functions that are sometimes needed:</p>+<p>+ <code>python manage.py ...</code>+</p>+<ul>+ <li>+ <code>download-exercise-images</code> - synchronizes the exercise+ images from wger.de to the local installation. Read its help text+ as it could save the wrong image to the wrong exercise should different+ IDs match.+ </li>+ <li>+ <code>extract-categories-i18n</code> - extract strings from the database+ that have to be inserted manually in the PO file when translating. These+ include e.g. exercise categories.+ </li>+ <li>+ <code>delete-temp-users</code> - deletes all guest users older than 1 week.+ You will probably want to run this regularly via a cron job.+ </li>+ <li>+ <code>submitted-exercises</code> - prints a list of user submitted+ exercises+ </li>+</ul>-<a name="contribute-code"></a>-<h3>{% trans "How to contribute code" %}</h3>-<p>{% blocktrans %}For other ways of contributing besides code, you might-want to take a look at <a href="{{contribute}}">the contribute page</a>{% endblocktrans %}</p>+<h4>Settings files</h4>+<p>wger uses two settings files to configure django:</p><ul>- <li>{% blocktrans %}<strong>Send pull requests:</strong> for new code-you want to share, please send pull requests (either in bitbucket or in-github). Sending patches by email or attaching them to an issue means a lot-more of work.{% endblocktrans %}</li>+ <li>+ <strong>settings.py:</strong> the settings for the local installation.+ You can overwrite global settings here, the output of <em>python start.py+ --show-config</em> will show you the default location.+ </li>+ <li>+ <strong>settings_global.py:</strong> global settings, usually this file+ is never edited.+ </li>+</ul>+- <li>{% blocktrans %}<strong>Run the tests:</strong> wger is proud to+++<a name="contribute-code"></a>+<h3>How to contribute code</h3>+<p>For other ways of contributing besides code, you might+want to take a look at <a href="{% url 'software:contribute' %}">the contribute page</a></p>++<ul>+ <li>+ <strong>Send pull requests:</strong> for new code+ you want to share, please send pull requests in github. Sending patches by+ email or attaching them to an issue means a lot more of work. It's+ recommended that you work on a feature branch when working on something,+ specially when it's something bigger. While you can rebase before sending+ a pull request, it's not necessary.+ </li>++ <li><strong>Run the tests:</strong> wger is proud tohave a test coverage of over 90%. When you implement something new, don't forgetto run the testsuite and write approriate tests for the new code. If you usegithub, configure the awesome <a href="http://travis-ci.org/">Travis CI</a>,-there is already a .travis file in the sources.{% endblocktrans %}</li>-- <li>{% blocktrans %}<strong>Code according to PEP8:</strong> check that-the code is structured as per pep8 but with a maximum line lenght of 100.-This can be checked automatically with the pep8 tool (pip install pep8) from-the command line:-<code>pep8 --max-line-length=100--exclude="urls.py,*migrations*" wger</code>-{% endblocktrans %}</li>+there is already a .travis file in the sources.</li>++ <li><strong>Code according to PEP8:</strong> check that+ the code is structured as per pep8 but with a maximum line length of 100.+ This can be checked automatically with the pep8 tool (pip install pep8)+ from the command line (travis will do this as part of the tests):+ <code>pep8 --max-line-length=100--exclude="urls.py,*migrations*" wger</code>+ </li></ul><a name="custom-hosting"></a>-<h3>{% trans "Custom hosting" %}</h3>-<p>{% blocktrans %}If you want to host this with some other evironment (apache,+<h3>Custom hosting</h3>+<p>If you want to host this with some other evironment (apache,postgreSQL, etc.), you need to perform some steps manually. First, install-the necessary packages and dependencies as described before.{% endblocktrans %}</p>+the necessary packages and dependencies as described before.</p>++<p>wger is regularly tested with the following software versions:</p>+<ul>+ <li><strong>Django:</strong> 1.4, 1.5, 1.6</li>+ <li><strong>Databases:</strong> sqlite, mysql, postgres</li>+ <li><strong>Python:</strong> 2.6, 2.7</li>+</ul>-<p>{% blocktrans %}Setup any database+<p>Setup any database<a href="https://docs.djangoproject.com/en/1.5/ref/databases/">that Djangosupports</a>. Then create a settings file and edit it as needed. There isanother configuration file, settings_global.py that contains other global-settings.{% endblocktrans %}</p>+settings.</p><code>$ python extras/scripts/create_local_settings.py</code>-<p>{% blocktrans %}Initialise the database, create a super user and load these-fixtures:{% endblocktrans %}</p>+<p>Initialise the database, create a super user and load these+fixtures:</p><code>$ python manage.py syncdb@@ -207,12 +269,12 @@ $ python manage.py loaddata weight_units$ python manage.py loaddata ingredient_units</code>-<p>{% blocktrans %}What you do next depends on the server you use and how you+<p>What you do next depends on the server you use and how youwant to serve the application (mod_wsgi, fastCGI). There is a sample <code>wsgi.py</code>file in the wger folder, edit it and adapt it to your needs and make the serverserve it, e.g. per mod_wsgi. Consult in any case the<a href="https://docs.djangoproject.com/en/1.5/howto/deployment/">django-documentation</a> on the topic.{% endblocktrans %}</p>+documentation</a> on the topic.</p>{% endblock %}@@ -223,12 +285,12 @@ documentation</a> on the topic.{% endblocktrans %}</p><ul><li><a href="#stable-version">{% trans "Installing the stable version" %}</a></li><li>- <a href="#developer-guide">{% trans "Developer guide" %}</a></li>+ <a href="#developer-guide">Developer guide</a></li><ul>- <li><a href="#get-code">{% trans "How to get the code" %}</a></li>- <li><a href="#get-started">{% trans "How to get started" %}</a></li>- <li><a href="#contribute-code">{% trans "How to contribute code" %}</a></li>- <li><a href="#custom-hosting">{% trans "Custom hosting" %}</a></li>+ <li><a href="#get-code">How to get the code</a></li>+ <li><a href="#get-started">How to get started</a></li>+ <li><a href="#contribute-code">How to contribute code</a></li>+ <li><a href="#custom-hosting">Custom hosting</a></li></ul></ul>{% endblock %}diff --git a/wger/software/urls.py b/wger/software/urls.pyindex f6e8ae82c..249c54d2d 100644--- a/wger/software/urls.py+++ b/wger/software/urls.py@@ -17,8 +17,6 @@from django.conf.urls import patterns, urlfrom django.views.generic import TemplateView-from wger.software.views import ContextTemplateView-urlpatterns = patterns('',url(r'^issues$',@@ -38,7 +36,7 @@ urlpatterns = patterns('',name='license'),url(r'^code$',- ContextTemplateView.as_view(template_name="code.html"),+ TemplateView.as_view(template_name="code.html"),name='code'),url(r'^contribute$',diff --git a/wger/software/views.py b/wger/software/views.pydeleted file mode 100644index a04afd0a3..000000000--- a/wger/software/views.py+++ /dev/null@@ -1,29 +0,0 @@-# -*- coding: utf-8 -*---# This file is part of wger Workout Manager.-#-# wger Workout Manager is free software: you can redistribute it and/or modify-# it under the terms of the GNU Affero General Public License as published by-# the Free Software Foundation, either version 3 of the License, or-# (at your option) any later version.-#-# wger Workout Manager is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU Affero General Public License--from django.views.generic import TemplateView-from django.core.urlresolvers import reverse---class ContextTemplateView(TemplateView):- '''- Overwrite TemplateView so we can use 'contribute' within a- blocktrans block.- '''- def get_context_data(self, **kwargs):- context = super(ContextTemplateView, self).get_context_data(**kwargs)- context.update({'contribute': reverse('software:contribute')})- return context