pep8 fixes
This commit is contained in:
parent
536ff42e1e
commit
dcd78ac304
@ -1,4 +1,4 @@
|
|||||||
from django.conf.urls import patterns, include, url
|
from django.conf.urls import patterns, url
|
||||||
from accounts.views import UserProfileView
|
from accounts.views import UserProfileView
|
||||||
|
|
||||||
from django.contrib.auth.views import password_change
|
from django.contrib.auth.views import password_change
|
||||||
|
@ -2,9 +2,7 @@ from django.db import models
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.core.validators import RegexValidator
|
from django.core.validators import RegexValidator
|
||||||
from django.forms import ModelForm
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.hashers import make_password
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from django.conf.urls import patterns, include, url
|
from django.conf.urls import patterns, url
|
||||||
from main.views import HomeView, OverviewView, HostView, DeleteHostView
|
from main.views import HomeView, OverviewView, HostView, DeleteHostView
|
||||||
from api.views import MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView
|
from api.views import MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.views.generic import TemplateView, CreateView
|
from django.views.generic import TemplateView, CreateView
|
||||||
from django.views.generic.list import ListView
|
|
||||||
from django.views.generic.edit import UpdateView, DeleteView
|
from django.views.generic.edit import UpdateView, DeleteView
|
||||||
from django.http import HttpResponse, HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.conf import settings
|
|
||||||
from django.shortcuts import render, get_object_or_404
|
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.hashers import make_password
|
from django.contrib.auth.hashers import make_password
|
||||||
@ -15,6 +12,7 @@ import dns.inet
|
|||||||
from main.forms import HostForm
|
from main.forms import HostForm
|
||||||
from main.models import Host
|
from main.models import Host
|
||||||
|
|
||||||
|
|
||||||
class HomeView(TemplateView):
|
class HomeView(TemplateView):
|
||||||
template_name = "main/home.html"
|
template_name = "main/home.html"
|
||||||
|
|
||||||
@ -28,7 +26,7 @@ class HomeView(TemplateView):
|
|||||||
key = 'ipv4' if af == dns.inet.AF_INET else 'ipv6'
|
key = 'ipv4' if af == dns.inet.AF_INET else 'ipv6'
|
||||||
s[key] = ipaddr
|
s[key] = ipaddr
|
||||||
s.save()
|
s.save()
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
from django.conf.urls import patterns, include, url
|
from django.conf.urls import patterns, include, url
|
||||||
from django.views.generic import TemplateView
|
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user