Browse Source

Fix small typos in dev_intro

master
rubenwardy 8 months ago
parent
commit
7fdd2cc7c9
  1. 2
      README.md
  2. 18
      docs/dev_intro.md
  3. 2
      docs/getting_started.md

2
README.md

@ -6,7 +6,7 @@ Developed by rubenwardy, license AGPLv3.0+. @@ -6,7 +6,7 @@ Developed by rubenwardy, license AGPLv3.0+.
See [Getting Started](docs/getting_started.md) for setting up a development/prodiction environment.
See [Developer's Intro](docs/dev_intro.md) for an overview of the code organisation.
See [Developer Intro](docs/dev_intro.md) for an overview of the code organisation.
## How-tos

18
docs/dev_intro.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
# Developer's Introduction
# Developer Introduction
## Overview
@ -9,10 +9,10 @@ When a user makes a request, Python Flask will direct the request to a *route* i @@ -9,10 +9,10 @@ When a user makes a request, Python Flask will direct the request to a *route* i
A [blueprint](https://flask.palletsprojects.com/en/2.0.x/blueprints/) is a Flask construct to hold a set of routes.
Routes are implemented using Python, and likely to respond by using database *models* and rendering HTML *templates*.
Routes may also use functions in the `logic` module, which is a directory containing reusable functions. This
allows the API, asynchronous tasks, and the front-end to reuse code.
Routes may also use functions in the `app/logic/` module, which is a directory containing reusable functions. This
allows the API, background tasks, and the front-end to reuse code.
To avoid blocking web requests, background jobs run as
To avoid blocking web requests, background tasks run as
[Celery](https://docs.celeryproject.org/en/stable/getting-started/introduction.html) tasks.
@ -22,10 +22,10 @@ To avoid blocking web requests, background jobs run as @@ -22,10 +22,10 @@ To avoid blocking web requests, background jobs run as
The `app` directory contains the Python Flask application.
* `blueprints` contains all the Python code behind each endpoint.
* `templates` contains all the HTML templates used to generate responses. Each directory in here matches a director in blueprints.
* `models` contains all the Database table classes. ContentDB uses [SQLAlchemy](https://docs.sqlalchemy.org/en/14/) to interact with PostgreSQL.
* `flatpages` contains all the markdown user documentation, including `/help`.
* `blueprints` contains all the Python code behind each endpoint / route.
* `templates` contains all the HTML templates used to generate responses. Each directory in here matches a directory in blueprints.
* `models` contains all the database table classes. ContentDB uses [SQLAlchemy](https://docs.sqlalchemy.org/en/14/) to interact with PostgreSQL.
* `flatpages` contains all the markdown user documentation, including `/help/`.
* `public` contains files that should be added to the web server unedited. Examples include CSS libraries, images, and JS scripts.
* `scss` contains the stylesheet files, that are compiled into CSS.
* `tasks` contains the background tasks executed by [Celery](https://docs.celeryproject.org/en/stable/getting-started/introduction.html).
@ -61,7 +61,7 @@ A permission may be something like `Permission.EDIT_PACKAGE` or `Permission.DELE @@ -61,7 +61,7 @@ A permission may be something like `Permission.EDIT_PACKAGE` or `Permission.DELE
```bash
if not package.checkPerm(current_user, Permission.EDIT_PACKAGE):
abort(403)
abort(403)
```

2
docs/getting_started.md

@ -55,4 +55,4 @@ To hot/live update CDB whilst it is running, use: @@ -55,4 +55,4 @@ To hot/live update CDB whilst it is running, use:
This will only work with python code and templates, it won't update tasks or config.
Now consider reading the [Developer's Introduction](dev_intro.md).
Now consider reading the [Developer Introduction](dev_intro.md).

Loading…
Cancel
Save