mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Small documentation polishing
This commit is contained in:
@@ -3,11 +3,11 @@ Changelog
|
||||
|
||||
1.9 - IN DEVELOPMENT
|
||||
--------------------
|
||||
**2017-xx-xx**
|
||||
**2020-xx-xx**
|
||||
|
||||
Upgrade steps from 1.8:
|
||||
|
||||
* Django update to 1.11: ``pip install -r requirements.txt``
|
||||
* Django update to 3.x: ``pip install -r requirements.txt``
|
||||
* Database upgrade: ``python manage.py migrate``
|
||||
* Update static files (only production): ``python manage.py collectstatic``
|
||||
|
||||
|
||||
@@ -6,16 +6,7 @@ Coding Style Guide
|
||||
Python
|
||||
------
|
||||
|
||||
* Code according to PEP8
|
||||
|
||||
Check that the code is structured as per pep8 but with a maximum line
|
||||
length of 100.
|
||||
|
||||
* Code for Python 3
|
||||
|
||||
While the application should remain compatible with python2, use django's
|
||||
suggestion to mantain sanity: code for py3 and treat py2 as a backwards
|
||||
compatibility requirement. If you need, you can use six.
|
||||
Code according to PEP8, but with but with a maximum line length of 100.
|
||||
|
||||
|
||||
Javascript
|
||||
@@ -32,9 +23,5 @@ Javascript
|
||||
Automatic coding style checks
|
||||
-----------------------------
|
||||
|
||||
The coding style is automatically check by Travis-CI. To manually check your
|
||||
files you can run the following commands:
|
||||
|
||||
* Python: ``pep8 wger``
|
||||
* Javascript: ``./node_modules/.bin/gulp lint-js`` (or just ``gulp lint-js`` if
|
||||
you installed the node libraries globally on your system)
|
||||
The coding style is automatically checked by GitHub actions after sending a
|
||||
pull request.
|
||||
|
||||
@@ -26,7 +26,7 @@ Create a virtual environment
|
||||
|
||||
It's a best practice to create a Python virtual environment::
|
||||
|
||||
$ virtualenv --python python3 venv-wger
|
||||
$ python3 -m venv venv-wger
|
||||
$ source venv-wger/bin/activate
|
||||
$ cd wger
|
||||
|
||||
@@ -37,6 +37,9 @@ Install Requirements
|
||||
To install the Python requirements::
|
||||
|
||||
$ pip install -r requirements_devel.txt
|
||||
$ pip install -r requirements_forked.txt
|
||||
$ npm install
|
||||
$ npm install bower
|
||||
$ python setup.py develop
|
||||
|
||||
Install application
|
||||
|
||||
@@ -5,6 +5,8 @@ There are docker files available to quickly get a version of wger up and
|
||||
running. They are all located under ``extras/docker`` if you want to build
|
||||
them yourself.
|
||||
|
||||
Note that you need to build from the project's source folder!
|
||||
|
||||
|
||||
Development
|
||||
-----------
|
||||
@@ -15,7 +17,7 @@ and serves it with django's development server.
|
||||
|
||||
First build the image::
|
||||
|
||||
docker build -t wger/devel .
|
||||
docker build -f extras/docker/development/Dockerfile -t wger/devel .
|
||||
|
||||
Run a container and start the application::
|
||||
|
||||
@@ -49,7 +51,7 @@ This image runs the application using WSGI and apache.
|
||||
|
||||
First build the image::
|
||||
|
||||
docker build --tag wger/apache .
|
||||
docker build -f extras/docker/apache/Dockerfile --tag wger/apache .
|
||||
|
||||
Run a container and start the application::
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ slightly different) you will need to change the steps as appropriate.
|
||||
The application is compatible and regularly tested with
|
||||
|
||||
* sqlite, postgres
|
||||
* python 2.7, 3.4, 3.5 and 3.6
|
||||
* python 3.6, 3.7 and 3.8
|
||||
|
||||
You might also want to take a look at the :ref:`other-changes` section for other
|
||||
changes you might want to do to your local instance such as Terms of Service or
|
||||
@@ -29,21 +29,7 @@ contact page.
|
||||
These are the necessary packages for both development and production
|
||||
(node and npm are only used to download JS and CSS libraries)::
|
||||
|
||||
sudo apt-get install nodejs npm git \
|
||||
python-virtualenv python3-dev \
|
||||
libjpeg8-dev zlib1g-dev libwebp-dev
|
||||
|
||||
On fedora 23::
|
||||
|
||||
sudo dnf install nodejs npm git \
|
||||
python-virtualenv python3-devel \
|
||||
libjpeg-turbo-devel zlib-devel
|
||||
|
||||
|
||||
.. note::
|
||||
The application is developed with python 3, which these installation
|
||||
instructions also use. If you want to use python 2.7, make sure you install
|
||||
the appropriate packages (e.g. python-dev instead of python3-dev, etc.)!
|
||||
sudo apt-get install nodejs npm git python3-dev
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
@@ -86,11 +86,3 @@ folders for more details.
|
||||
.. include the authors file from the root folder
|
||||
.. include:: ../AUTHORS.rst
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
||||
* :ref:`modindex`
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ Application
|
||||
|
||||
Make a virtualenv for python and activate it::
|
||||
|
||||
virtualenv --python python3 /home/wger/venv
|
||||
python3 -m venv /home/wger/venv
|
||||
source /home/wger/venv/bin/activate
|
||||
|
||||
Create folders to collect all static resources and save uploaded files. The
|
||||
|
||||
Reference in New Issue
Block a user