fix some issues found by pycharm

This commit is contained in:
Thomas Waldmann 2014-11-01 19:25:49 +01:00
parent 7878acf681
commit 4383226046
2 changed files with 1 additions and 4 deletions

View File

@ -280,7 +280,7 @@ class DeleteHostView(DeleteView):
def get_object(self, *args, **kwargs): def get_object(self, *args, **kwargs):
obj = super(DeleteHostView, self).get_object(*args, **kwargs) obj = super(DeleteHostView, self).get_object(*args, **kwargs)
if (obj.created_by != self.request.user or obj.abuse_blocked): if obj.created_by != self.request.user or obj.abuse_blocked:
# disallow deletion if abuse_blocked is set, otherwise the # disallow deletion if abuse_blocked is set, otherwise the
# abuser can just delete and recreate the host # abuser can just delete and recreate the host
raise PermissionDenied() # or Http404 raise PermissionDenied() # or Http404

View File

@ -7,9 +7,6 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
from django.contrib.auth import views as auth_views from django.contrib.auth import views as auth_views
from registration.backends.default.views import RegistrationView
from registration.forms import RegistrationForm
def remember_me_login(request, *args, **kw): def remember_me_login(request, *args, **kw):
""" """