6.2.1. project structure

Last page update: September 22, 2015

6.2.1.1. basic structure

In this section you can find the basic structure of a Genro project. Click on the relative links for more information on every single file/folder, including the 4 main project subfolders:

6.2.1.2. project autocreation

You can build a project with its four main subfolders with the command line:

gnrmkproject projectName -a

where projectName is the name you want for your project.

If you write the command line, you will create a project with the following structure:

../_images/myproject2.png

Note

the name of the istance folder (inside the instances folder) and the name of the site folder (inside the sites folder) are equal to the name of the project folder. This is a convention to keep order in your project.

6.2.1.2.1. terminal help

You can create a project setting many options. Type:

gnrmkproject -h

to call an help that explains all the possibilities:

Usage: gnrmkproject [options]

Options:
  -h, --help            show this help message and exit
  -b BASE_PATH, --base-path=BASE_PATH
                        base path where project will be created
  -s, --create-site     create site
  -i, --create-instance
                        create instance
  -a, --create-all      create both site and instance
  -p WSGI_PORT, --wsgi-port=WSGI_PORT
                        Specify WSGI port
  -r WSGI_RELOAD, --wsgi-reload=WSGI_RELOAD
                        Specify WSGI autoreload
  -d WSGI_DEBUG, --wsgi-debug=WSGI_DEBUG
                        Specify WSGI debug

Footnotes:

[1]Genro provides additional modules that implement common functions for all the applications (user management, table of Italian municipalities...)