fix some issues found by pycharm
This commit is contained in:
parent
7878acf681
commit
4383226046
@ -280,7 +280,7 @@ class DeleteHostView(DeleteView):
|
||||
|
||||
def get_object(self, *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
|
||||
# abuser can just delete and recreate the host
|
||||
raise PermissionDenied() # or Http404
|
||||
|
@ -7,9 +7,6 @@ from django.conf.urls import patterns, include, url
|
||||
from django.contrib import admin
|
||||
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):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user