structables 0.3.4__tar.gz → 0.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {structables-0.3.4 → structables-0.3.5}/PKG-INFO +1 -1
  2. {structables-0.3.4 → structables-0.3.5}/pyproject.toml +1 -1
  3. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/main.py +10 -1
  4. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/privacypolicy.html +1 -1
  5. {structables-0.3.4 → structables-0.3.5}/.forgejo/workflows/release.yml +0 -0
  6. {structables-0.3.4 → structables-0.3.5}/.gitignore +0 -0
  7. {structables-0.3.4 → structables-0.3.5}/LICENSE +0 -0
  8. {structables-0.3.4 → structables-0.3.5}/README.md +0 -0
  9. {structables-0.3.4 → structables-0.3.5}/cronjob.txt +0 -0
  10. {structables-0.3.4 → structables-0.3.5}/src/structables/__init__.py +0 -0
  11. {structables-0.3.4 → structables-0.3.5}/src/structables/config.py +0 -0
  12. {structables-0.3.4 → structables-0.3.5}/src/structables/main.py +0 -0
  13. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/__init__.py +0 -0
  14. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/category.py +0 -0
  15. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/contest.py +0 -0
  16. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/member.py +0 -0
  17. {structables-0.3.4 → structables-0.3.5}/src/structables/routes/proxy.py +0 -0
  18. {structables-0.3.4 → structables-0.3.5}/src/structables/static/css/style.css +0 -0
  19. {structables-0.3.4 → structables-0.3.5}/src/structables/static/dist/css/bootstrap.min.css +0 -0
  20. {structables-0.3.4 → structables-0.3.5}/src/structables/static/dist/css/bootstrap.min.css.map +0 -0
  21. {structables-0.3.4 → structables-0.3.5}/src/structables/static/dist/js/bootstrap.bundle.min.js +0 -0
  22. {structables-0.3.4 → structables-0.3.5}/src/structables/static/dist/js/bootstrap.bundle.min.js.map +0 -0
  23. {structables-0.3.4 → structables-0.3.5}/src/structables/static/img/logo.png +0 -0
  24. {structables-0.3.4 → structables-0.3.5}/src/structables/static/img/logo_lg.png +0 -0
  25. {structables-0.3.4 → structables-0.3.5}/src/structables/static/img/magnifying-glass-solid.svg +0 -0
  26. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/400.html +0 -0
  27. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/404.html +0 -0
  28. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/429.html +0 -0
  29. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/500.html +0 -0
  30. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/archives.html +0 -0
  31. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/article-review.html +0 -0
  32. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/article.html +0 -0
  33. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/base.html +0 -0
  34. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/category.html +0 -0
  35. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/collection.html +0 -0
  36. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/contest.html +0 -0
  37. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/contests.html +0 -0
  38. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/footer.html +0 -0
  39. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/header.html +0 -0
  40. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/iframe.html +0 -0
  41. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/index.html +0 -0
  42. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/member-instructables.html +0 -0
  43. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/member.html +0 -0
  44. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/projects.html +0 -0
  45. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/sitemap.html +0 -0
  46. {structables-0.3.4 → structables-0.3.5}/src/structables/templates/style.html +0 -0
  47. {structables-0.3.4 → structables-0.3.5}/src/structables/utils/data.py +0 -0
  48. {structables-0.3.4 → structables-0.3.5}/src/structables/utils/helpers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: structables
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: A simple frontend for Instructables
5
5
  Project-URL: Homepage, https://git.private.coffee/privatecoffee/structables
6
6
  Project-URL: Bug Tracker, https://git.private.coffee/privatecoffee/structables/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "structables"
7
- version = "0.3.4"
7
+ version = "0.3.5"
8
8
  authors = [
9
9
  { name="Private.coffee Team", email="support@private.coffee" },
10
10
  ]
@@ -333,10 +333,19 @@ def init_main_routes(app):
333
333
 
334
334
  @app.route("/privacypolicy/")
335
335
  def privacypolicy():
336
+ """Display the privacy policy.
337
+
338
+ The privacy policy is loaded from the file specified in the
339
+ `STRUCTABLES_PRIVACY_FILE` environment variable. If that variable is
340
+ unset or the file cannot be read, a default message is displayed.
341
+ """
342
+
336
343
  content = "No privacy policy found."
337
344
 
345
+ path = app.config.get("PRIVACY_FILE", "privacy.txt")
346
+
338
347
  try:
339
- with (pathlib.Path(__file__).parent / "privacy.txt").open() as f:
348
+ with pathlib.Path(path).open() as f:
340
349
  content = f.read()
341
350
  except OSError:
342
351
  pass
@@ -5,6 +5,6 @@
5
5
  <br>
6
6
  <h1 style="font-size:2em;line-height:0em;">Privacy Policy</h1>
7
7
  <br>
8
- <p>{{ content }}</p>
8
+ <p>{{ content|safe }}</p>
9
9
  </center>
10
10
  {% endblock %}
File without changes
File without changes
File without changes
File without changes