Commit graph

50 commits

Author SHA1 Message Date
e1c47e8bf6 Minor decorator fix. 2023-06-25 21:13:52 -07:00
ce30077013 First attempt at online permissions. 2023-02-04 13:49:42 -08:00
e78a667ee3 Move the session into requests.session for universal access. 2023-02-01 22:04:44 -08:00
d13443d70e Match bytestring typo fix. 2022-11-13 19:12:50 -08:00
e6f5d16a03
Bring catch_etiquette_exception into common.
The decorators file only had a single function in it.
2022-04-05 11:53:35 -07:00
1e9e948431
Move decorate_and_route to flasktools. 2021-10-31 15:11:17 -07:00
1f18713875
Add reminder of what __file__.parent.parent evaluates to. 2021-10-31 15:10:54 -07:00
f0d302d4a5
Move give_theme_cookie to flasktools. 2021-10-30 17:29:43 -07:00
6ac1d8a90a
Add remark about X-Forwarded-For. 2021-10-24 23:21:11 -07:00
91cf08efde
Match renamed flasktools.json_response. 2021-10-01 23:05:46 -07:00
82a6103d8d
Fix leftover imports. 2021-06-08 16:04:20 -07:00
f003f55fca
Move make_json_response to voussoirkit.flasktools. 2021-06-04 21:49:45 -07:00
47c4790d36
Remove unnecessary intermediate variable ip. 2021-06-04 21:33:55 -07:00
7f8a007e2d
Add decorators.give_theme_cookie to decouple from render_template.
I realized it was not appropriate for render_template to be handling
this responsibility, but previously did not think of another way.
Now I did.
2021-06-04 21:29:23 -07:00
1554b86c11
Use flasktools.ensure_response_type. 2021-06-04 21:28:23 -07:00
53e8030186
Move REQUEST_TYPES, RESPONSE_TYPES to voussoirkit.flasktools. 2021-06-04 21:00:22 -07:00
0012999744
Remove some pointless whitespace. 2021-06-04 20:52:39 -07:00
e3872e1da4
Update requirements.txt. 2021-04-04 11:17:45 -07:00
ff1ec3896b
Use voussoirkit.flasktools for gzip_response. 2021-04-02 18:31:44 -07:00
361795237c
Store value request.is_localhost and pass request into all jinjas. 2021-02-25 18:52:25 -08:00
53eaf8b815
Fix docstring still referring to etiquette_flask_launch. 2021-01-20 18:26:43 -08:00
fb5f2f2470
Move site.debug to _dev, _prod launchers. 2021-01-20 18:26:42 -08:00
e5be26f8b0 Add PhotoDB.closest_photodb for frontend instantiation. 2021-01-09 15:42:16 -08:00
4087827e86 Delete some old vars and slightly improve some clarity. 2021-01-07 19:25:47 -08:00
1d33923601 Rename caching.py -> client_caching.py.
The word caching can be ambiguous, and what's worse is this file
previously contained a decorator for server-side caching of a
response and a class for client-side caching of files. It was
confusing. This new separation and naming should make it easier
to find what you're looking for.
2021-01-05 13:03:41 -08:00
8ab248a34e Improve naming and comments in FileEtagManager 2021-01-05 12:59:18 -08:00
9b8159c453 Improve gzip decision logic.
Previous called get_data which is dangerous for large but
indeterminate response sizes, and the bail chain was more
difficult to reason about than a simple should_gzip true/false.
2021-01-05 01:27:14 -08:00
8ecf594945 Move jsonify methods into the objects instead of separate file. 2021-01-01 17:02:01 -08:00
6b71af307c Let Slate be the default theme.
Hooray for dark mode. Sorry classic turquoise.
2020-10-17 18:12:42 -07:00
d8276b763d Fix default theme evaluation. 2020-10-01 19:58:23 -07:00
5e6a666ca2 Add option --localhost_only. 2020-09-30 15:15:49 -07:00
d152987b97 Let /album/add_child, /remove_child take multiple IDs. 2020-09-27 23:35:01 -07:00
41353b2eb4 Move current default css into theme_turquoise. Always pick a theme. 2020-09-25 16:27:47 -07:00
28181428be Synchronize Etiquette and YCDL. 2020-09-22 02:54:26 -07:00
f70349470f Don't gzip large responses. 2020-09-20 01:06:23 -07:00
adb1d0ef39 Replace all double blank lines with single, improve hash headers.
There was always some semblance that two blank lines has some kind of
meaning or structure that's different from single blank lines, but
in reality it was mostly arbitrary and I can't stand to look at it
any more.
2020-09-19 03:13:23 -07:00
2ac6633f55 Remove leftover print statement. 2020-09-18 21:36:09 -07:00
42d4b7fafb Add give_token, catch_etiquette_exception to all endpoints at once. 2020-09-12 11:43:25 -07:00
f7e5b639e3 Remove *args from common.render_template. Just template_name. 2020-09-12 10:13:24 -07:00
f640268793 Gzip responses. 2020-09-11 23:12:37 -07:00
193c8645ed Save the user's CSS theme in a cookie so it stays across pages. 2020-09-09 19:26:11 -07:00
c425d55331 Use decorators in jinja_filters to automatically register them. 2020-09-09 13:23:16 -07:00
d585fe92a9 Let search_core return author as real list.
This lets search.html deal with real objects instead of playing with
dumed-down strings.
2020-09-09 13:08:41 -07:00
94b811b3b1 Let search_core return extension as real list.
This lets search.html deal with real objects instead of playing with
dumed-down strings.
2020-09-09 13:07:22 -07:00
02db1f3971 Make response_type required, explicit in all calls. 2020-02-26 17:50:36 -08:00
9d620b4b97 Remove unused imports & other small things. 2020-02-20 22:44:56 -08:00
ae6ab72536 Add jinja_filters.make_attributes.
Actually it's a function but not a filter. For creating html
attributes out of a dict.
2020-01-14 15:10:47 -08:00
d7307a6c44 Centralize flask.render_template calls to simplify common args. 2019-08-14 13:40:52 -07:00
0eb9addb1c Use a single constant for both areas of caching duration. 2019-01-13 14:47:13 -08:00
6e312bd287 Rename the etiquette_flask backend package to backend.
Alright, I got tired of confusing myself with the same-named
outer and inner package.
Keep in mind that every frontend implementation is supposed to be
its own independent project where etiquette is nothing but a
dependency. So the name backend is not ambiguous with the etiquette
backend.
2018-11-04 19:45:23 -08:00
Renamed from frontends/etiquette_flask/etiquette_flask/common.py (Browse further)