summaryrefslogtreecommitdiffstats
path: root/activities
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-17 19:21:00 -0700
committerAndrew Godwin2022-11-17 17:33:09 -0700
commit291d7e404e12e1d017403242f8ed199046f0904c (patch)
tree89a60ff7f321537b6a58835aaa726f7e22ed09ba /activities
parent0851fbd1ec09b142608667bf90ee806e59cafb28 (diff)
downloadtakahe-291d7e404e12e1d017403242f8ed199046f0904c.tar.gz
takahe-291d7e404e12e1d017403242f8ed199046f0904c.tar.bz2
takahe-291d7e404e12e1d017403242f8ed199046f0904c.zip
Logged out experience, config, and profiles
Diffstat (limited to 'activities')
-rw-r--r--activities/models/post_attachment.py7
-rw-r--r--activities/views/timelines.py1
2 files changed, 6 insertions, 2 deletions
diff --git a/activities/models/post_attachment.py b/activities/models/post_attachment.py
index ee77d29..6ccea08 100644
--- a/activities/models/post_attachment.py
+++ b/activities/models/post_attachment.py
@@ -1,5 +1,8 @@
+from functools import partial
+
from django.db import models
+from core.uploads import upload_namer
from stator.models import State, StateField, StateGraph, StatorModel
@@ -31,7 +34,9 @@ class PostAttachment(StatorModel):
mimetype = models.CharField(max_length=200)
# File may not be populated if it's remote and not cached on our side yet
- file = models.FileField(upload_to="attachments/%Y/%m/%d/", null=True, blank=True)
+ file = models.FileField(
+ upload_to=partial(upload_namer, "attachments"), null=True, blank=True
+ )
remote_url = models.CharField(max_length=500, null=True, blank=True)
diff --git a/activities/views/timelines.py b/activities/views/timelines.py
index 38f9331..65b6c49 100644
--- a/activities/views/timelines.py
+++ b/activities/views/timelines.py
@@ -57,7 +57,6 @@ class Home(FormView):
return redirect(".")
-@method_decorator(identity_required, name="dispatch")
class Local(TemplateView):
template_name = "activities/local.html"