Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 2.56 KB

directory_structure.rst

File metadata and controls

30 lines (21 loc) · 2.56 KB

Directory Structure

This is not intended to be an exhaustive list, just a summary with some comments, to help new devs find things. Starting in the root of the repository:

  • docs: Fairly new and therefore very incomplete; add to it!
    • admin
    • dev
  • esp: The root of the django project.
    • esp: The root of the python code. Every folder from here on down needs to have an __init__.py. Contains a directory for each django app we use, along with some other files and directories. There are a whole lot of these, but the most important are below. Each app contains a file or directory for models, views, and tests; most also contain a directory for migrations.
      • accounting: The website’s accounting system (accounting_core and accounting_docs are old and deprecated).
      • program: This app contains most of the site’s logic. For the most part it’s a fairly normal Django app, but it also contains all the program modules.
        • models: The main models for Program, ClassSubject, ClassSection; many of the other models used by programs live in other apps, such as resources.
        • modules: This directory contains all the program modules. The python code for the individual modules is in handlers/<name>module.py; most of the remainder of the directory won’t be relevant to you. See program_modules.rst for details on the program module system.
      • qsd: This app contains all of the code for the website’s system for admin-editable text (named QSD for historical reasons).
      • users: This app contains important models like ESPUser, Permission, Record, ContactInfo, and so on.
      • *_settings.py: Various files in which our django settings are kept. django_settings.py contains settings used by all sites; local_settings.py is generated by the setup script and contains site-specific settings.
      • urls.py: Master URL routing table.
    • manage.py: Runs django commands like ./manage.py shell_plus.
    • public: Contains things that will be served statically. * media: Includes our javascript, CSS, images, etc. Served statically at /media/, so /esp/public/media/scripts/foo.js would be served at doma.in/media/scripts/foo.js.
    • templates: Contains our django templates, in a directory structure roughly mirroring that of /esp/esp.
    • useful_scripts: Contains various scripts intended to be run by devs, of varying usefulness, which may be site-specific, terribly-coded, completely broken, etc.