voussoir
82a6103d8d
Fix leftover imports.
2021-06-08 16:04:20 -07:00
voussoir
f003f55fca
Move make_json_response to voussoirkit.flasktools.
2021-06-04 21:49:45 -07:00
voussoir
47c4790d36
Remove unnecessary intermediate variable ip.
2021-06-04 21:33:55 -07:00
voussoir
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
voussoir
1554b86c11
Use flasktools.ensure_response_type.
2021-06-04 21:28:23 -07:00
voussoir
53e8030186
Move REQUEST_TYPES, RESPONSE_TYPES to voussoirkit.flasktools.
2021-06-04 21:00:22 -07:00
voussoir
0012999744
Remove some pointless whitespace.
2021-06-04 20:52:39 -07:00
voussoir
e3872e1da4
Update requirements.txt.
2021-04-04 11:17:45 -07:00
voussoir
ff1ec3896b
Use voussoirkit.flasktools for gzip_response.
2021-04-02 18:31:44 -07:00
voussoir
361795237c
Store value request.is_localhost and pass request into all jinjas.
2021-02-25 18:52:25 -08:00
voussoir
53eaf8b815
Fix docstring still referring to etiquette_flask_launch.
2021-01-20 18:26:43 -08:00
voussoir
fb5f2f2470
Move site.debug to _dev, _prod launchers.
2021-01-20 18:26:42 -08:00
voussoir
e5be26f8b0
Add PhotoDB.closest_photodb for frontend instantiation.
2021-01-09 15:42:16 -08:00
voussoir
4087827e86
Delete some old vars and slightly improve some clarity.
2021-01-07 19:25:47 -08:00
voussoir
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
voussoir
8ab248a34e
Improve naming and comments in FileEtagManager
2021-01-05 12:59:18 -08:00
voussoir
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
voussoir
8ecf594945
Move jsonify methods into the objects instead of separate file.
2021-01-01 17:02:01 -08:00
voussoir
6b71af307c
Let Slate be the default theme.
...
Hooray for dark mode. Sorry classic turquoise.
2020-10-17 18:12:42 -07:00
voussoir
d8276b763d
Fix default theme evaluation.
2020-10-01 19:58:23 -07:00
voussoir
5e6a666ca2
Add option --localhost_only.
2020-09-30 15:15:49 -07:00
voussoir
d152987b97
Let /album/add_child, /remove_child take multiple IDs.
2020-09-27 23:35:01 -07:00
voussoir
41353b2eb4
Move current default css into theme_turquoise. Always pick a theme.
2020-09-25 16:27:47 -07:00
voussoir
28181428be
Synchronize Etiquette and YCDL.
2020-09-22 02:54:26 -07:00
voussoir
f70349470f
Don't gzip large responses.
2020-09-20 01:06:23 -07:00
voussoir
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
voussoir
2ac6633f55
Remove leftover print statement.
2020-09-18 21:36:09 -07:00
voussoir
42d4b7fafb
Add give_token, catch_etiquette_exception to all endpoints at once.
2020-09-12 11:43:25 -07:00
voussoir
f7e5b639e3
Remove *args from common.render_template. Just template_name.
2020-09-12 10:13:24 -07:00
voussoir
f640268793
Gzip responses.
2020-09-11 23:12:37 -07:00
voussoir
193c8645ed
Save the user's CSS theme in a cookie so it stays across pages.
2020-09-09 19:26:11 -07:00
voussoir
c425d55331
Use decorators in jinja_filters to automatically register them.
2020-09-09 13:23:16 -07:00
voussoir
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
voussoir
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
voussoir
02db1f3971
Make response_type required, explicit in all calls.
2020-02-26 17:50:36 -08:00
voussoir
9d620b4b97
Remove unused imports & other small things.
2020-02-20 22:44:56 -08:00
voussoir
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
voussoir
d7307a6c44
Centralize flask.render_template calls to simplify common args.
2019-08-14 13:40:52 -07:00
voussoir
0eb9addb1c
Use a single constant for both areas of caching duration.
2019-01-13 14:47:13 -08:00
voussoir
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