You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPER.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
+
<!-- omit from toc -->
1
2
# Developer documentation for fulcrum
2
3
3
4
This documentation is intended for developers working on fulcrum. This explains how to set up fulcrum locally, why some design decisions were made, and anything else you should need. If you need any help, message in #tech-team on the UWCS discord.
4
5
5
6
If you're a user pls see the [user documentation](USER.md) instead.
6
7
8
+
<!-- omit from toc -->
7
9
## Table of Contents
8
10
9
11
-[Running](#running)
10
12
-[SSL Note](#ssl-note)
11
-
-[libcairo-2.dll](#libcairo-2dll)
13
+
-[Timezones Note](#timezones-note)
12
14
-[Stack](#stack)
13
15
-[File Structure](#file-structure)
14
16
-[Database schema](#database-schema)
15
17
-[API](#api)
18
+
-[Creating and managing API keys](#creating-and-managing-api-keys)
@@ -22,6 +25,7 @@ If you're a user pls see the [user documentation](USER.md) instead.
22
25
-[Warwick Weeks](#warwick-weeks)
23
26
-[Warwick Map API](#warwick-map-api)
24
27
-[Testing](#testing)
28
+
-[Ideas for the future](#ideas-for-the-future)
25
29
26
30
## Running
27
31
@@ -62,6 +66,12 @@ The app uses UWCS's keycloak server for authentication. This is set to enable bo
62
66
63
67
If you are not exec, you can bypass auth by setting the environment variable `DEV` to `1`.
64
68
69
+
### Timezones Note
70
+
71
+
The database currently stores and interprets all datetimes as naive Europe/London dts. An ORM reconstructor is used in the `Event` model to make localising of read dts consistent with what (mostly) previously occurred with a newly constructed `Event`. The API now returns full ISO-8601 dt strings for external usage.
72
+
73
+
Using `replace` on `tzinfo` with pytz causes inconsistent behaviour, notably causing weird offsets of 1 minute, hence the use of `localize` instead. This is due to LMT shenanigans (see Raven's braindump about this if you're interested: https://discord.com/channels/189453139584221185/292281159495450625/1421431330440216696)
74
+
65
75
## Stack
66
76
67
77
Note the site uses the same stack (Flask, SQLAlchemy) as [CS139](https://warwick.ac.uk/fac/sci/dcs/teaching/modules/cs139/), to enable easy maintenance and development by most DCS students. Notably this means that there is no frontend framework (e.g. React, Vue) and the site is rendered server-side. Should this change in the future, the API is set up to partially support this (although it will probably need some tweaking). If some js is complex, I would reccomend using a pre-existing library (see bootstrap and tags) as this will make maintenance easier.
0 commit comments