Brown-University-Library / disa_dj_project

MIT License
2 stars 3 forks source link

On this page:

Glossary

Note: Over the course of the project, the terminology has changed, with the result that different areas of the codebase use different names for the same concepts.

While we aspire to eventually to update for consistency, in the meantime, these three terms listed below are used interchangeably in code. The first listed option (in bold) is the one currently used by the project, and the term used in the database is indicated by db:

Installation

(Assumes Docker is installed and running.)

From the terminal, run:

The webapp should be running; from a browser, go to http://127.0.0.1:8000/version/ or http://127.0.0.1:8000/login/.

Typical usage

Note: if a code-update installs a new python-package, either:

Notes for those of us who don't know Django

Some critical files:

disa_dj_project/config/settings.py

Django settings for disa_project. Mostly "where are things" and security keys, etc.

Generated by 'django-admin startproject' using Django 1.11.

More information on this file

Full list of settings and their values

disa_dj_project/config/urls.py

Maps URL patterns to views, e.g.:

url( r'^editor/documents/(?P<cite_id>.*)/$', views.edit_citation, name='edit_citation_url' )

which maps to the function definition in disa_dj_project/disa_app/views.py:

@shib_login
def edit_citation( request, cite_id=None ):

disa_dj_project/disa_app/admin.py

Seems to extend administrative functions, and handles the "marked for deletion" system. Contains 3 class definitions:

disa_dj_project/disa_app/disa_app_templates

The templates for the public pages. These files are referenced in disa_app/views.py.

disa_dj_project/disa_app/lib

A bunch of DISA-specific python code. This seems to be the main code area.

Includes:

disa_dj_project/disa_app/models_sqlalchemy.py

Model definition for SQL Alchemy

disa_dj_project/disa_app/models.py

Not sure (ask Birkin)

disa_dj_project/disa_app/settings_app.py

Some random settings—authentication, DB location, etc. Not sure how this relates to disa_dj_project/config/settings.py

disa_dj_project/disa_app/views.py

A bunch of routines that are called by disa_dj_project/config/urls.py and reference disa_dj_project/disa_app/disa_app_templates.