From 45785c9e51d3d4f091ea9f81683448c101f69ebb Mon Sep 17 00:00:00 2001 From: Evert Date: Tue, 26 Dec 2017 19:34:24 +0200 Subject: [PATCH] Fix WrongAppError --- Show/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Show/views.py b/Show/views.py index af4373d..eff4d8c 100644 --- a/Show/views.py +++ b/Show/views.py @@ -100,7 +100,7 @@ def SubmissionForm(req, abbr, season, episode): ctx['error'] = 'This URL has already been submitted!' return render(req, "submit.html", ctx) - if not user.has_perm('show.change_show'): + if not user.has_perm('LandingPage.change_show'): # Check if there has been a submission by this user for this episode within the last 24 hours if Submission.objects.filter(user=user,episode=episode,timestamp__gte=datetime.datetime.now() - datetime.timedelta(hours=24)).count() > 0: ctx['error'] = 'You can only submit one link for an episode in 24 hours!' @@ -118,7 +118,7 @@ def SubmissionForm(req, abbr, season, episode): return render(req, "submit.html", ctx) # Edit a submission - for moderators -@permission_required_or_403('show.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) +@permission_required_or_403('LandingPage.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) def SubmissionModForm(req, abbr, submission): show = get_object_or_404(Show, abbr=abbr) submission = get_object_or_404(Submission, pk=submission) @@ -159,7 +159,7 @@ def SubmissionModForm(req, abbr, submission): return render(req, "submit_mod.html", ctx) # Season form GET and POST -@permission_required_or_403('show.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) +@permission_required_or_403('LandingPage.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) def SeasonSubmitForm(req, abbr): show = get_object_or_404(Show, abbr=abbr) user = req.user @@ -196,7 +196,7 @@ def SeasonSubmitForm(req, abbr): return render(req, "season_add.html", ctx) # Episode form GET and POST -@permission_required_or_403('show.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) +@permission_required_or_403('LandingPage.change_show', (Show, 'abbr', 'abbr'), accept_global_perms=True) def EpisodeSubmitForm(req, abbr, season): show = get_object_or_404(Show, abbr=abbr) season = get_object_or_404(Season, show=show,number=season)