File: setup_database.rst

package info (click to toggle)
tryton-server 7.0.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,748 kB
  • sloc: python: 53,502; xml: 5,194; sh: 803; sql: 217; makefile: 28
file content (31 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.. _tutorial-module-setup-database:

Initialize the database
=======================

By default Tryton, use an SQLite database stored in the folder :file:`db` of
your home directory.
This can be changed in the ``database`` section of the `configuration
<topics-configuration>`.

Now creating a Tryton database is only a matter of executing the following
commands:

.. code-block:: console

   $ mkdir ~/db
   $ touch ~/db/test.sqlite
   $ trytond-admin -d test --all

You will be prompted to set the administrator email and password.

Once the database is initialized you can run the Tryton server:

.. code-block:: console

    $ trytond

Connecting to the database using a Tryton client you will be greeted by the
module configuration wizard.

We will continue with :ref:`the anatomy of the module <tutorial-module-anatomy>`.