Skip to content

Implementing get routes

CSDUMMI requested to merge Implementing_GET_Routes into Unautenticated_With_JS

This is not supposed to be merged yet. But having these Requests open makes it more easily possible for us to keep an eye on those Branches, that we still work on and review the code. It also makes the goal of a branch clear. My goal here is to implement the GET Routes underlying the UI. In the end, this is supposed to make it easy to test (by hand) the different functionalities of the site.

I want to ( and have partly already done so) implement:

GET / -> index.html  with messages : List[{ "title" : str, "hash" : to use in /read }]
GET /login -> login.html 
GET /readings -> readings-index.html with readings :  List[{ "title" : str, "hash" : to use in /read }]
GET /writings -> writings-index.html with writings :  List[{ "title" : str, "hash" : to use in /write }]
GET /elections -> elections.html with elections : List[{ "title" : str, "hash" : to use in /vote}]
GET /read/<hash of message> -> read.html with reading : Message
GET /write/<hash of unfinished message if writing on a draft> -> write.html with writing : Draft Message
GET /vote/<hash of the open election> -> vote.html with Election 

I am using Jinja2 Templates. This means that in Unautenticated_With_JS we will have to use that Template Engine to present, for example: The title of a post and a link to the /read/ of the post in / and /. Message, Draft Message and Election are directly from the Database and by current plans, unencrypted (at least for Message and Draft Message).

Explanation to the format: Before the -> is the valid HTTP Header. After it the HTML Template File it links to and after with the Jinja2 Variables and their Type.

Merge request reports