weblate/docs/admin/install/steps/install-configure.rst
Michal Čihař 8a492512c4
docs: update Python environment documentation (#18108)
Use "Python environment" instead of a bit cryptic "virtualenv". This
also matches how uv documents it.
2026-02-19 14:21:58 +01:00

69 lines
1.8 KiB
ReStructuredText

Configuring Weblate
+++++++++++++++++++
.. note::
The following assumes the Python environment used by Weblate is activated
(by executing ``. ~/weblate-env/bin/activate``). If not, specify the full path
to the :command:`weblate` command as ``~/weblate-env/bin/weblate``.
#. Copy the file :file:`~/weblate-env/lib/python3.9/site-packages/weblate/settings_example.py`
to :file:`~/weblate-env/lib/python3.9/site-packages/weblate/settings.py`.
#.
.. include:: /admin/install/steps/adjust-config.rst
#. Create the database and its structure for Weblate (the example settings use
PostgreSQL, check :ref:`database-setup` for a production-ready setup):
.. code-block:: sh
weblate migrate
.. seealso::
:wladmin:`migrate`
#. Create an administrator user account ``admin``, generate its password, and copy it
to the clipboard; remember to save it for later use:
.. code-block:: sh
weblate createadmin
.. hint::
If you previously missed/lost the admin password, you can generate a new one with the following command:
.. code-block:: sh
weblate createadmin --update
.. seealso::
:wladmin:`createadmin`
#. Collect the static files for your web server (see :ref:`server` and :ref:`static-files`):
.. code-block:: sh
weblate collectstatic
#. Compress the JavaScript and CSS files (optional, see :ref:`production-compress`):
.. code-block:: sh
weblate compress
#. Start the Celery workers. This is not necessary for development purposes, but
strongly recommended otherwise. :ref:`celery` has more info:
.. code-block:: sh
~/weblate-env/lib/python3.9/site-packages/weblate/examples/celery start
#. Start the development server (:ref:`server` details a production setup):
.. code-block:: sh
weblate runserver