Commit graph

30 commits

Author SHA1 Message Date
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)