Inyoka is developed via GitHub. You can find a documentation on how to use Git here: http://git-scm.com/
The idea for developing Inyoka is to fork the main project, do your changes in your own branch in your repository and then open a “Pull Request” for the original Inyoka-repository. A developer will then review your changes or will directly merge it.
The changes in Inyoka will not immediately be visible on ubuntuusers.de
For using Inyoka and its dependencies you need a lot of python and developer files:
$ sudo apt install git npm libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev uuid-dev libfreetype6-dev libpq-dev build-essential libpq-dev libffi-dev python3-dev python3-venvNow you can start the installation of inyoka:
$ mkdir -p ~/.venvs/
$ python -m venv ~/.venvs/inyoka
$ source ~/.venvs/inyoka/bin/activate
$ cd to/my/inyoka-repo # replace with correct path
$ pip install -r extra/requirements/development.txtThe last command downloads and installs all needed libraries via pip.
Note
If you are interested in how these files are generated, see :ref:`packagemanagement`.
Note
We recommend to rebuild the virtualenv regularly.
Just using pip in an existing virtualenv can leave f.e. old dropped dependencies in the virtualenv.
Alternatively, pip-sync or uv sync have the benefit of removing all unneeded packages from the virtualenv.
At the end you need to edit your /etc/hosts with root privileges and add
the following line:
127.0.0.1 ubuntuusers.local forum.ubuntuusers.local paste.ubuntuusers.local wiki.ubuntuusers.local planet.ubuntuusers.local ikhaya.ubuntuusers.local static.ubuntuusers.local media.ubuntuusers.localThis will route all ubuntuusers.local calls in your browser to your localhost.
Inyoka supports multiple themes, all of them are listed (among other things) on GitHub. Please refer to the specific theme README file in order to get installation instructions.
To work on Inyoka you need to activate the virtual environment. It will change the PATH and the prompt:
$ source ~/.venvs/inyoka/bin/activateNote
You need to do this every time you open a new terminal/shell and want to work on Inyoka!
If the environment is active you'll see the entry (inyoka) at the start of your prompt.
You can check if the environment is active:
(inyoka)$ echo $PATHThe entry /home/$USER/.venvs/inyoka/bin should appear at the beginning.
Inyoka supports mainly PostgreSQL as database. PostgreSQL is proven and tested on ubuntuusers.de. All other databases supported by Django can have performance issues or less supported features! Inyoka also needs a running redis server.
$ sudo apt install postgresql redis-serverNext, you need a development_settings.py file which can be copied from
the example file:
$ cp example_development_settings.py development_settings.pyIf you have set a database password during installation you need to specify the password:
'NAME': 'ubuntuusers',
'USER': 'root',
'PASSWORD': '',Further you need to set a SECRET_KEY with a string, like this:
SECRET_KEY = 'development-key'To switch between the supported languages you have to add another setting.
Currently available languages are en-us and de-de.
LANGUAGE_CODE= 'de-de'You need to add a database in PostgreSQL:
$ sudo -i -u postgres
$ createuser -P inyoka
$ createdb -O inyoka inyokaNext you need to add a superuser so that you gain all rights in the development installation of Inyoka:
(inyoka)$ python manage.py migrate
(inyoka)$ python manage.py create_superuser
username: admin
email: admin@localhost
password: admin
repeat: admin
created superuserYou can also use another password, but you should keep the admin username because it will be used in some test files. It is also advisable to use that mail address in order to be able to test notifications, see :ref:`testing notifications <test-notifies>`.
Note
If you want to change settings in the admin's control panel, you need to
set the email address to admin@localhost.local to not raise an error. The
email address is then automatically set back to admin@localhost.
Now you can create the real test data:
(inyoka)$ ./make_testdata.pyFinally you can start the server the first time:
(inyoka)$ python manage.py runserver ubuntuusers.local:8080Open the url http://ubuntuusers.local:8080/ in your browser. You can login with the user admin and the given password above.
Congratulations: You have installed a local instance of Inyoka. It is time to start hacking, read :ref:`getting-started` to learn how to submit your first fix.