Application Structure

The website’s software is written in Python and uses the Flask framework. Below you can find an overview of the file structure:

  • config - default configuration

  • files:

    • export - files generated from SQL

    • processed images - smaller generated files which are more suitable for web browsers

    • uploads - files uploaded by users

  • install - contains e.g. SQL files for installation:

    • crm - used to import the CIDOC CRM, not needed for application to run

    • upgrade - SQL upgrade files and information how to upgrade

  • instance - configuration files

  • openatlas:

    • api

    • database - SQL code lives here

    • display - display manager and utility functions

    • forms - form manager and other form related files

    • models - classes used in the application

    • static - the web root containing CSS, JavaScript, layout images, etc.

    • templates - HTML template files

    • translations - source and compiled files for translations

    • views - files concerning routing, redirects, etc.

  • sphinx - source files of the user manual, for more details see Sphinx

  • test

To retrace a call that was made from a web browser (for example /entity/15883) the following steps will be executed:

  • openatlas/init.py is processed and before_request() is executed

  • The URL is resolved and a function in views is called, in this case view() from openatlas/views/entity.py

  • Most often some model information is needed, in this case get_by_id() in openatlas/models/entity.py

  • All SQL is located in database, so in this case get_by_id() in openatlas/database/entity.py is called

  • A template is called from the view, in this case openatlas/templates/entity/view.html

  • The template may use filters defined in openatlas/display/util.py such as: some_data|some_filter