Commit Graph

81 Commits

Author SHA1 Message Date
Lacey Williams Henschel
d6563e6965 Add task to save rendered content to db; call tasks on delay 2023-07-03 13:19:55 -07:00
Lacey Williams Henschel
713fc2d578 Rename functions 2023-07-03 13:19:55 -07:00
Lacey Williams Henschel
ea33581565 Reorganize tasks into better DRY-er modules 2023-07-03 13:19:55 -07:00
Lacey Williams Henschel
2fa07cef36 Add clear by cache key to view 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
99e1c46d8e Delete content by cache key from redis and db 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
afb511dfd4 Add view to clear cache by content type 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
a06d9856c0 Add task to clear all rendered content cache 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
ba53f5053f Clear redis cache by content type 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
4dcdeb9c0f Add docstring 2023-06-27 15:25:56 -07:00
Lacey Williams Henschel
aa0bab9b89 Delete RenderedContent objects by content type 2023-06-27 15:25:56 -07:00
Natalia
2e0f083dad Run pre-commit checks before landing changes.
Add `pre-commit` to the requirements list, and updated the version it uses.
Also removed the `sample.adoc` since the relevant test always creates it (and
it was causing spurious lint check errors).
2023-06-14 16:37:06 -03:00
Lacey Williams Henschel
825dbc019b Cache asciidoc content in db (Part of #394)
- Add RenderedContent model and related helper methods
- Change StaticContentView `get()` logic to try the cache, then the db, then S3
- Change StaticContentView to update db appropriately
- Refactoring for readability/maintainability
2023-06-09 14:43:05 -07:00
Lacey Williams Henschel
a447ffd7ed Strip footer from asciidoc content (Part of #394) 2023-06-07 14:17:06 -07:00
Lacey Williams Henschel
4e26f55dd1 Extract content of HTML body from rendered asciidoc content (Part of #394)
- Make web service depend on redis
- Add function to extract body from html content
- In view, extract body before returning converted ascciidoc in response
2023-06-07 13:11:20 -07:00
Natalia
9ec7a37bb5 Rework of news entries ACLs.
This includes a helper to efficiently query for all moderators.
2023-06-06 17:04:26 -03:00
Lacey Williams Henschel
41b40cd1f3 Command to convert based on file input 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
7e27b468f1 🚧 WIP asciidoc 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
12a7b499c9 Add docstrings 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
44aafb8a1e Linter 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
0ff65b95a7 Apply some style to the asciidoc content 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
b183c5bf44 Add option to delete temp file 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
a3cdcf097c Add comments, cleanup 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
624cbe6525 Serve asciidoc content from template, refactor tests 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
60713d0c37 Return converted html from task 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
e84b1d1682 Add function to get content type 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
e3f37294aa Add celery task to convert adoc to html 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
d1b3da670c Command to convert based on file input 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
2b31b07bbd 🚧 WIP asciidoc 2023-06-06 11:14:50 -07:00
Lacey Williams Henschel
f6f1b10a5d Command to convert based on file input 2023-06-01 11:35:34 -07:00
Lacey Williams Henschel
97505d6f85 🚧 WIP asciidoc 2023-06-01 11:35:34 -07:00
Natalia
a8cd8f507a Ran pre-commit run -a
Completed runs of black and rest of pre-commit checks.
2023-05-30 23:21:53 -03:00
Lacey Williams Henschel
fb582afe9c Add temp privacy policy page 2023-05-23 16:31:44 -07:00
Lacey Williams Henschel
8cc6b91cf2 Force content type for js fstatic content 2023-05-11 10:05:31 -07:00
Lacey Williams Henschel
579d61fc82 :❄️ Make STATIC_CACHE_TIMEOUT a string 2023-05-10 11:49:19 -07:00
Lacey Williams Henschel
b88eb50755 Shorten static content cache timeout and serve from a setting 2023-05-04 15:58:21 -07:00
Lacey Williams Henschel
3368a74d8d Merge branch 'main' of github.com:CPPAlliance/boost.org into 153-caching 2023-05-03 13:55:50 -07:00
Frank Wiles
1f9f0deef7 Black 2023-04-26 09:49:57 -05:00
Frank Wiles
73895f9081 Fix renderer tests for new S3 layout 2023-04-26 09:32:30 -05:00
Lacey Williams Henschel
662ebe46f6 Merge branch 'main' of github.com:CPPAlliance/boost.org into 153-caching 2023-04-25 13:26:16 -07:00
Lacey Williams Henschel
a59741b2f2 🔥 Unused import 2023-04-19 13:18:03 -07:00
Lacey Williams Henschel
dc9424520c Picky test things 2023-04-19 13:15:17 -07:00
Lacey Williams Henschel
25e2ff3362 Fix mocked S3 tests 2023-04-19 13:07:14 -07:00
Lacey Williams Henschel
3fe65e7051 👕 Fix imports 2023-04-19 11:24:04 -07:00
Lacey Williams Henschel
2d987242c4 Fix cache tests 2023-04-19 11:21:21 -07:00
Lacey Williams Henschel
b11b129619 Merge branch 'main' of github.com:CPPAlliance/boost.org into 153-caching 2023-04-19 10:47:34 -07:00
Lacey Williams Henschel
8d980068db Improve exception handling and logging 2023-04-18 16:22:48 -07:00
Lacey Williams Henschel
f58d03d4c7 🔈 Add logging 2023-04-18 15:31:05 -07:00
Frank Wiles
ba568a2c6e Fix test that is no longer valid 2023-04-14 16:04:17 -05:00
Frank Wiles
a4e1d2b02f Adjust static content paths for /develop/doc/
- Add feature to static site finding that looks for `/index.html` if URL
  ends with a slash
2023-04-14 15:56:19 -05:00
Frank Wiles
d3b417f8ab Adjust static content settings names
Realized we have a conflict in settings names between S3 hosted
static content and S3 hosted uploaded media content. Prefixing
static content with `STATIC_CONTENT_`
2023-04-06 06:09:09 -05:00