Skip to content
Ben Cipollini edited this page Feb 11, 2014 · 10 revisions

KA Lite is a medium-size project, so keeping a well-defined structure is essential to making it understandable.

Below is an outline of the directory structure for the project, as well as how apps are currently structured.

Directories

The KA Lite project has the following subdirectories:

Code

  • kalite - Django apps we've created or downloaded and modified for the ka lite projects
  • python-packages - Django apps and Python package dependencies for apps within kalite
  • scripts - OS-specific scripts for starting/stopping server (and other similar tasks)

Resources

  • content - contains video files and video preview images
  • data - private json data files the server uses
  • docs - .md files for developers and KA Lite users
  • locale - contains translations that are downloaded via language pack updates

App structure

Files

  • Each app contains relevant standard Django files (forms.py, models.py, views.py, urls.py)
  • Some apps have both HTML views as well as API/JSON views. These are defined by api_xxx.py files, such as api_views.py, api_urls.py, etc.
  • Any shared functions across the app/module with other apps should be defined within the __init__.py file
  • Some apps have additional functionality, especially for central server - distributed server interactions (e.g. api_client.py). This may get refactored...
Clone this wiki locally