Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 1f613dc

Browse files
adding to the documentation
1 parent fc41575 commit 1f613dc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,22 @@ Deadline: July 23
1919

2020
---
2121

22+
In order to explain the workflow of what happens in the application, here is a visual representation of the flow from the end user and the administrator end, and both of their interactions with the Django application.
23+
24+
![Visualization of the flow](_docs/django-flow.png)
25+
26+
When the **end user** sends a HTTP request to the server, **Django** (in reality, Django's `wsgi` application, but we will not get into that now) will handle the request, and use its internal settings to send appropriate queries to the **backend database**. In this `alpha-3` version, the database backend is a sqlite database, but in a future version we will use MySQL or PostgreSQL. The database will send back its results, and Django will send the response to its **template generator**, which will create the response (in HTML format, in most cases, to the end user).
27+
28+
On the **administrator**'s side, we can interact with django through the built-in `manage.py` command, via the command line. With our Django application comes a custom-built command that can run through Django's `manage.py`, and it's called `downloaddata`. The easiest way to run it, is to run `python manage.py downloaddata --wipe --all` (for more information about this command, see [Populate Database](_docs/populate.md)).
29+
30+
Once you run the `downloaddata` with the `--all` flag, it will loop through all repositories, downloading all of the markdown files from respective repositories, and parse them, using a "home-cooked" Python script. The script converts markdown to HTML, as well, first trying to do so through [GitHub's REST API](https://docs.github.com/en/rest/reference/markdown) (via [PyGithub](https://github.com/PyGithub/PyGithub)) and, if that fails, using the [Python-Markdown](https://github.com/Python-Markdown/markdown) package, with some plug-ins.
31+
32+
---
33+
2234
## Scenarios
2335

36+
To make the documentation more navigable, here are some common scenarios, and how you can get this Django deployment up and running.
37+
2438
### Install and run
2539

2640
Are you trying to install the Django app and run it on a local machine? Here are the three steps you need to follow:

_docs/django-flow.png

395 KB
Loading

0 commit comments

Comments
 (0)