- Code layout of the Application
Code layout of the Application¶
Folder where SQLite database files are located.
Python code goes here
In the ecm package, there are a few files:
- `settings.py ->` Django settings
- `urls.py ->` URL mappings to view functions
- `manage.py ->` Django administration script
All the data-models go there and are located in subdirectories named after their domain.
- ecm.data.accounting == -> accounting information
- ecm.data.roles -> all human resources stuff (roles, titles, members, etc.)
- ecm.data.corp -> corporation details (hangars, wallet divisions, etc.)
- ecm.data.assets -> corporation hangar contents (history as well)
- ecm.data.scheduler -> scheduler for various tasks (CCP API fetching/parsing, database polling for potential alerts, old records cleanup, etc.)
- ecm.data.common -> various models (character associations to players, colorthresholds for access levels, update dates of the tables, etc.)
Things are being computed here (as much as possible)
EVE related stuff
- ecm.core.eve.api.py -> utility for EVE API connection
- ecm.core.eve.cache.py -> thread-safe caching for EVE database (used by `db.py`)
- ecm.core.eve.classes.py -> objects mappings for EVE database (entry point for the database)
- ecm.core.eve.constants.py -> EVE constants
- ecm.core.eve.db.py -> EVE database queries (used by `classes.py`)
CCP API fetchers and parsers (modules have an update() function)
Contains external python librairies
NOTE: eveapi.py is a modified version of eveapi)
View functions pointed by urls subdivided in subpackages named after their domain.
Normally, view functions that end with _data == are meant to return pure json data and not HTML pages (this is just a convention I took).
Data to load in the database at initialization.
All static resources of the application (images, stylesheets, scripts).
Django templates used by view functions to render web pages.
bootstrap script for installing ECM in Apache HTTPD with mod_wsgi
Apache virtual host config file.