mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 06:06:06 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86730d4f7a | ||
|
|
6a6ed5462f | ||
|
|
d914fa0658 |
No files matched your search
+2
-5
@@ -346,16 +346,13 @@ class ForumTopicDetailView(CanViewMixin, DetailView):
|
||||
return kwargs
|
||||
|
||||
|
||||
class ForumMessageView(SingleObjectMixin, UserPassesTestMixin, RedirectView):
|
||||
class ForumMessageView(SingleObjectMixin, RedirectView):
|
||||
model = ForumMessage
|
||||
pk_url_kwarg = "message_id"
|
||||
permanent = False
|
||||
|
||||
def test_func(self) -> bool:
|
||||
self.object = self.get_object()
|
||||
return self.request.user.can_view(self.object)
|
||||
|
||||
def get_redirect_url(self, *args, **kwargs):
|
||||
self.object = self.get_object()
|
||||
return self.object.get_url()
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ dependencies = [
|
||||
"django-ninja>=1.7.1,<2.0.0",
|
||||
"django-ninja-extra>=0.31.7",
|
||||
"Pillow>=12.3.0,<13.0.0",
|
||||
"aemark>=0.1.4",
|
||||
"aemark>=0.1.1",
|
||||
"django-jinja<3.0.0,>=2.11.0",
|
||||
"cryptography>=50.0.2,<51.0.0",
|
||||
"django-phonenumber-field>=8.5.0,<9.0.0",
|
||||
|
||||
Reference in new issue
Block a user