diff --git a/Pipfile b/Pipfile index 5f57881..aa8b926 100644 --- a/Pipfile +++ b/Pipfile @@ -21,7 +21,7 @@ requests = "*" six = "*" "urllib3" = "*" webencodings = "*" -Django = "~=3.2" +Django = "~=4.2" django-html_sanitizer = "*" inscriptis = "*" lxml = "*" diff --git a/brutaldon/settings.py b/brutaldon/settings.py index 93676a1..cdb4d28 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -12,6 +12,14 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ import os +# Work around issue in sanitizer +import django +try: + from django.utils.encoding import smart_text +except: + from django.utils.encoding import smart_str + django.utils.encoding.smart_text = smart_str + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/brutaldon/templates/main/timeline.html b/brutaldon/templates/main/timeline.html index 2d97c96..113c83e 100644 --- a/brutaldon/templates/main/timeline.html +++ b/brutaldon/templates/main/timeline.html @@ -14,16 +14,8 @@ {% endblock %} {% block content %} -

Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime

- {% if form %} -

Post

-
- {% include "main/post_minimal_partial.html" %} -
-
- {% endif %} -

Your {{ timeline_name }} timeline

-
+

Your {{ timeline_name }} timeline

+
{% for toot in toots %} {% cache 600 toot_partial toot.id %} {% if toot.reblog %} diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index e7363a7..5333894 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -11,13 +11,16 @@