Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reorganize imports

  • Loading branch information...
commit edf5563e9efe56fc11fbb5d99a66b955e2602de6 1 parent 4395556
@sergiocharpineljr sergiocharpineljr authored
View
2  ispdb/config/admin.py
@@ -1,5 +1,5 @@
-from ispdb.config.models import Config, Domain, DomainRequest
from django.contrib import admin
+from ispdb.config.models import Config, Domain, DomainRequest
class DomainInline(admin.TabularInline):
View
6 ispdb/config/configChecks.py
@@ -2,12 +2,12 @@
This file contains methods to do sanity checks on domains and configs
"""
-import re
-import smtplib
+import dns.resolver
import imaplib
import poplib
+import re
+import smtplib
import ssl
-import dns.resolver
import tldextract
TIMEOUT = 10
View
11 ispdb/config/forms.py
@@ -2,17 +2,16 @@
import re
from django.core.urlresolvers import reverse
-from django.forms import (ChoiceField, BooleanField, HiddenInput, ModelForm,
+from django.forms import (BooleanField, ChoiceField, HiddenInput, ModelForm,
RadioSelect, ValidationError)
-from django.forms.models import BaseModelFormSet
-from django.forms.models import modelformset_factory
+from django.forms.models import BaseModelFormSet, modelformset_factory
+from django.utils.functional import curry
from django.utils.safestring import mark_safe
from django.utils.translation import get_language_info
-from django.utils.functional import curry
from django.utils.translation.trans_real import parse_accept_lang_header
-from ispdb.config.models import (Config, Domain, DomainRequest, DocURL,
- DocURLDesc, EnableURL, EnableURLInst, Issue)
+from ispdb.config.models import (Config, DocURL, DocURLDesc, Domain,
+ DomainRequest, EnableURL, EnableURLInst, Issue)
def clean_port(self, field):
View
3  ispdb/config/templatetags/custom_filters.py
@@ -1,4 +1,5 @@
-#ispdb/templatetags/data_verbose.py
+# -*- coding: utf-8 -*-
+
from django import template
from django.utils import timezone
View
40 ispdb/config/views.py
@@ -1,34 +1,30 @@
# -*- coding: utf-8 -*-
-import StringIO
import lxml.etree as ET
+import StringIO
-from django.http import HttpResponse, HttpResponseRedirect, Http404
-from django.contrib.auth.decorators import login_required
-from django.contrib.auth.decorators import permission_required
-from django.core.urlresolvers import reverse
-from django.shortcuts import get_object_or_404
-from django.shortcuts import render_to_response
-from django.forms.models import modelformset_factory
-from django.contrib.auth import logout
-from django.template import RequestContext
-from django.utils import simplejson
-from django.utils import timezone
-from django.db.models import Q
+from django.conf import settings
from django.contrib import comments
-from django.contrib.comments.views.comments import post_comment
+from django.contrib.auth import logout
+from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.comments.models import Comment
+from django.contrib.comments.views.comments import post_comment
from django.contrib.contenttypes.models import ContentType
-from django.conf import settings
+from django.core.urlresolvers import reverse
+from django.db.models import Q
+from django.forms.models import modelformset_factory
+from django.http import Http404, HttpResponse, HttpResponseRedirect
+from django.shortcuts import get_object_or_404, render_to_response
+from django.template import RequestContext
+from django.utils import simplejson, timezone
-from ispdb.config.models import (Config, Domain, DomainRequest, Issue, DocURL,
- EnableURL)
-from ispdb.config.forms import (ConfigForm, DomainForm, BaseDomainFormSet,
- IssueForm, BaseDocURLFormSet, DocURLForm, EnableURLForm,
- BaseEnableURLFormSet)
from ispdb.config import serializers
-from ispdb.config.configChecks import do_domain_checks
-from ispdb.config.configChecks import do_config_checks
+from ispdb.config.configChecks import do_config_checks, do_domain_checks
+from ispdb.config.forms import (BaseDocURLFormSet, BaseDomainFormSet,
+ BaseEnableURLFormSet, ConfigForm, DocURLForm, DomainForm, EnableURLForm,
+ IssueForm)
+from ispdb.config.models import (Config, DocURL, Domain, DomainRequest,
+ EnableURL, Issue)
@login_required
View
4 ispdb/convert.py
@@ -1,7 +1,7 @@
-import os
import lxml.etree as ET
+import os
-from ispdb.config.models import Domain, Config
+from ispdb.config.models import Config, Domain
def get_username(element):
View
4 ispdb/tests/test_add.py
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
-from django.test import TestCase
from django.core.urlresolvers import reverse
from django.forms import ValidationError
+from django.test import TestCase
from django.utils import timezone
from nose.tools import assert_equal, assert_false, assert_raises, assert_true
from ispdb.config import models
from ispdb.tests.common import adding_domain_form, asking_domain_form
-from ispdb.tests.common import success_code, fail_code
+from ispdb.tests.common import fail_code, success_code
class AddTest(TestCase):
View
9 ispdb/tests/test_approve.py
@@ -1,9 +1,12 @@
-from django.test import TestCase
-from django.contrib.comments.models import Comment
-from ispdb.config.models import Config
+
from urllib import quote_plus
+
+from django.contrib.comments.models import Comment
+from django.test import TestCase
from nose.tools import assert_equal, assert_true
+from ispdb.config.models import Config
+
class ApproveTest(TestCase):
fixtures = ['xml_testdata', 'login_testdata']
View
2  ispdb/tests/test_delete.py
@@ -2,8 +2,8 @@
import httplib
-from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.test import TestCase
from django.utils import timezone
from nose.tools import assert_equal, assert_true
View
2  ispdb/tests/test_edit.py
@@ -2,8 +2,8 @@
from urllib import quote_plus
-from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.test import TestCase
from nose.tools import assert_equal, assert_false, assert_true
from ispdb.config import models
View
2  ispdb/tests/test_issue.py
@@ -2,8 +2,8 @@
from urllib import quote_plus
-from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.test import TestCase
from nose.tools import assert_equal, assert_false, assert_true
from ispdb.config import models
View
9 ispdb/tests/test_sanity.py
@@ -1,15 +1,16 @@
# -*- coding: utf-8 -*-
import dns.resolver
-import mox
-import smtplib
import imaplib
+import mox
import poplib
+import smtplib
-from django.utils import simplejson
-from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.test import TestCase
+from django.utils import simplejson
from nose.tools import assert_equal
+
from ispdb.config.configChecks import (do_domain_checks, do_config_checks,
get_nameservers, get_mxservers, imap_check_plain, imap_check_ssl,
imap_check_starttls, pop3_check_plain, pop3_check_ssl, pop3_check_starttls,
View
2  ispdb/tests/test_view.py
@@ -3,8 +3,8 @@
import os
from lxml import etree
-from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.test import TestCase
from nose.tools import assert_equal
from ispdb.config import models
Please sign in to comment.
Something went wrong with that request. Please try again.