Jam.py documentation

Creating a project

Create a new directory.

Go into the directory and run from command line:

$ jam-project.py

The following files and folders will be created in the directory:

/
    css/
    js/
    img/
    reports/
    static/
    admin.sqlite
    server.py
    index.html
    wsgi.py

To start Jam.py web server run server.py script.

$ ./server.py

Note

You can specify a port as parameter, for example

$ ./server.py 8081.

By default, the port is 8080. If you will specify another port, you need to use it in a browser in the next steps.

Open a Web browser and go to “/builder.html” on your local domain – e.g., http://127.0.0.1:8080/builder.html. You should see the select language dialog.

127.0.0.1:8080/builder.html

In the dialog that will appear, select the language and press OK button.

Jam.py language dialog

In the New project dialog box fill in:

  • Caption - the project name that appears to users
  • Name - name of project (task) that will be used in programming code to get access to the task object. Should be a short valid python identifier.
  • DB type — select database type. If database is not Sqlite, it must be created in advance and its attributes should be entered in the corresponding form fields.
New project setup

When you press OK, the connection to the database will be checked, and in case of failure an error message will be displayed.

Note

Please note the following requirements:

  • to use FireBird database, the python fdb library must be installed
  • PostgreSQL requires psycopg2 library
  • MySQL requires MySQLdb library
  • Oracle requires cx_Oracle library
  • to generate reports LibreOffice must be installed

Note

For SQLite databases, when an item field is deleted in the Application builder, the field in the database table is not deleted, when the field is renamed, the field in the table does not change.

If all goes well, a new project will be created and the project tree will appear in the Application builder.

Jam.py Application builder

Now, to see the project itself, create a new page in the browser and type in the address bar:

127.0.0.1:8080
Jam.py project