Commit 72cc63fe by Estók Dániel

Cleanup

parent dc1a5179
......@@ -2,6 +2,7 @@ from django.core.files.storage import FileSystemStorage
from django.conf import settings
import os
class OverwriteStorage(FileSystemStorage):
def get_available_name(self, name):
if self.exists(name):
......
......@@ -21,7 +21,7 @@ class IndexView(TemplateView):
def get(self, request, *args, **kwargs):
if self.request.user.is_authenticated():
return TemplateView.get(self, request, *args, **kwargs) # To be checked!
return TemplateView.get(self, request, *args, **kwargs)
else:
return redirect(auth.views.login)
......@@ -113,7 +113,8 @@ class DetailView(IndexView):
try:
serviceObject = Service.objects.get(id=kwargs['pk'])
if serviceObject.user != self.request.user:
return HttpResponseForbidden("You don't have permission to open the service.")
return HttpResponseForbidden(
"You don't have permission to open the service.")
except:
raise Http404
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment