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:
project
folder
instances folder - here lies all your instance folder. Every instance folder has got:
- a custom folder
- a data folder
- an instanceconfig.xml file
packages folder - here lies all your package folder. Every package folder has got:
resources folder (for all your project private resources)
sites folder - here lies all your sites folder. Every site folder has got:
- a pages folder
- a root.py file
- a sitesconfig.xml file
6.2.1.2. project autocreation¶
You can build a project with its four main subfolders with the command line:
gnrmkproject projectName -awhere
projectName
is the name you want for your project.If you write the command line, you will create a project with the following structure:
Note
the name of the istance folder (inside the
instances
folder) and the name of the site folder (inside thesites
folder) are equal to the name of theproject
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 -hto 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...) |