Commit 7dd38e07 authored by Michal Čihař's avatar Michal Čihař

Improve documentation of management commands

parent 50fc2340
.. _manage: .. _manage:
Management commands Management commands
------------------- ===================
The ./manage.py is extended with following commands: The ./manage.py is extended with following commands:
checkgit
--------
.. django-admin:: checkgit .. django-admin:: checkgit
Prints current state of backend git repository. Prints current state of backend git repository.
You can either define which subproject to check (eg. ``weblate/master``) or
use ``--all`` to check all existing subprojects.
You can either define which subproject to check (eg. ``weblate/master``) or commitgit
use ``--all`` to check all existing subprojects. ---------
.. django-admin:: commitgit .. django-admin:: commitgit
Commits any possible pending changes to backend git repository. Commits any possible pending changes to backend git repository.
You can either define which subproject to check (eg. ``weblate/master``) or
use ``--all`` to check all existing subprojects.
You can either define which subproject to check (eg. ``weblate/master``) or cleanuptrans
use ``--all`` to check all existing subprojects. ------------
.. django-admin:: cleanuptrans .. django-admin:: cleanuptrans
Cleanups orphnaed checks and translation suggestions. Cleanups orphnaed checks and translation suggestions.
createadmin
-----------
.. django-admin:: createadmin .. django-admin:: createadmin
Creates admin account with pasword admin. Creates admin account with pasword admin.
import_project <project> <gitrepo> <branch> <filemask>
------------------------------------------------------
.. django-admin:: import_project
.. django-admin:: import_project <project> <gitrepo> <branch> <filemask> Imports subprojects into project based on filemask.
Imports subprojects into project based on filemask. The `<project>` defines into which project subprojects should be imported
(needs to exists).
The `<project>` defines into which project subprojects should be imported The `<gitrepo>` defines URL of Git repository to use, `<branch>` which
(needs to exists). branch to use.
The `<gitrepo>` defines URL of Git repository to use, `<branch>` which List of subprojects to create are automatically obtained from `<filemask>`
branch to use. - it has to contains one double wildcard (`**`), which is replacement for
subproject.
List of subprojects to create are automatically obtained from `<filemask>` For example:
- it has to contains one double wildcard (`**`), which is replacement for
subproject.
For example: .. code-block:: bash
.. code-block:: sh ./manage.py import_project debian-handbook git://anonscm.debian.org/debian-handbook/debian-handbook.git squeeze/master '*/**.po'
./manage.py import_project debian-handbook git://anonscm.debian.org/debian-handbook/debian-handbook.git squeeze/master '*/**.po' loadpo
------
.. django-admin:: loadpo .. django-admin:: loadpo
Reloads translations from disk (eg. in case you did some updates in Git Reloads translations from disk (eg. in case you did some updates in Git
repository). repository).
rebuild_index
-------------
.. django-admin:: rebuild_index .. django-admin:: rebuild_index
Rebuilds index for fulltext search. This might be lengthy operation if you Rebuilds index for fulltext search. This might be lengthy operation if you
have huge set of translation units. have huge set of translation units.
You can use ``--clean`` to remove all words from database prior updating.
You can use ``--clean`` to remove all words from database prior updating. update_index
------------
.. django-admin:: update_index .. django-admin:: update_index
Updates index for fulltext search when :setting:`OFFLOAD_INDEXING` is enabled. Updates index for fulltext search when :setting:`OFFLOAD_INDEXING` is enabled.
It is recommended to run this frequently (eg. every 5 minutes) to have index
uptodate.
It is recommended to run this frequently (eg. every 5 minutes) to have index setupgroups
uptodate. -----------
.. django-admin:: setupgroups .. django-admin:: setupgroups
Configures default groups and (if called with ``--move``) assigns all users Configures default groups and (if called with ``--move``) assigns all users
to default group. to default group.
The option ``--no-update`` disables update of existing groups (only adds The option ``--no-update`` disables update of existing groups (only adds
new ones). new ones).
.. seealso:: :ref:`privileges` .. seealso:: :ref:`privileges`
setuplang
---------
.. django-admin:: setuplang .. django-admin:: setuplang
Setups list of languages (it has own list and all defined in Setups list of languages (it has own list and all defined in
translate-toolkit). translate-toolkit).
The option ``--no-update`` disables update of existing languages (only add
new ones).
The option ``--no-update`` disables update of existing languages (only add updatechecks
new ones). ------------
.. django-admin:: updatechecks .. django-admin:: updatechecks
Updates all check for all units. This could be useful only on upgrades Updates all check for all units. This could be useful only on upgrades
which do major changes to checks. which do major changes to checks.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
You can either define which project or subproject to update (eg. updategit
``weblate/master``) or use ``--all`` to update all existing subprojects. ---------
.. django-admin:: updategit .. django-admin:: updategit
Fetches remote Git repositories and updates internal cache. Fetches remote Git repositories and updates internal cache.
You can either define which project or subproject to update (eg. You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects. ``weblate/master``) or use ``--all`` to update all existing subprojects.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment