summaryrefslogtreecommitdiff
path: root/README.org
blob: a21340505342a74c49aef105c8b1fca784186420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#+TITLE: README.org for =yesno=
#+AUTHOR: Marius Peter
#+DATE: Created: <2020-01-22 Wed> Updated: <2020-02-05 Wed>

* Folder structure

** =Pipfile=
   Inspecting this file reveals the Python dependencies required by the Flask application.
   The convenient =pipenv= Python package bundles together the creation of virtual environments and populating these virtual environments using the same commands as =pip=. For more information on =pipenv=, visit [[https://github.com/pypa/pipenv][the official pipenv page]].

** =Pipfile.lock=
   This file contains checksums for the packages installed via =pipenv=.

** =README.org=
   This is the file you are currently reading. Github automatically formats README files and presents underneath the code explorer.

** =app= directory
   Contains =.py= Python scripts calling the =Flask= library in order to serve web pages to the end user.

*** =static=
    Static files and assets do not change during the =Flask= application's execution.

**** =img=
     This is where website images are saved. User images will be stored in a database, which is currently not implemented.

**** =styles=
     Here, we store =CSS= style sheets. These contain appearance information for elements described in =HTML= documents.

*** =templates=
    In the templates folder, we organise our =HTML= templates. Rather than simple =HTML= documents which always present the same content to all users, templates are rendered to the user's browser by the application and are populated during loading with content we can request via the Python application.

*** =routes.py=
    This Python file containes our website routes. These are the names of our website's pages, followed by functions describing actions performed on the server side every time a user visits a certain page.

*** =forms.py=
    This Python file contains the forms that our user will sign in throughout the website (registration, login). Possible implementation of the messaging system as a series of forms sent from user to user.

* Prerequisites

  1. A Python interpreter and the following dependencies:
     | Dependency         | Minimum version |
     |--------------------+-----------------|
     | =flask=            |                 |
     | =flask-wtf=        |                 |
     | =uwsgi=            |                 |
     | =flask-socketio=   |                 |
     | =flask-sqlalchemy= |                 |
     | =psycopg2=         |                 |

  2. A web browser

* Installation

  1. Install Python
  2. Install dependencies

* Viewing the website

  1. Run the =routes.py= script using your Python interpreter.
  2. Visit =127.0.0.1= on your web browser.
Copyright 2019--2024 Marius PETER