Skip to content

Commit

Permalink
Optimizing imports in project files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreedhar Bukya committed Jun 21, 2015
1 parent 84b286c commit 99c36d1
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 29 deletions.
2 changes: 0 additions & 2 deletions docs/conf.py
Expand Up @@ -11,8 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down
4 changes: 2 additions & 2 deletions examples/blog/articles/models.py
Expand Up @@ -6,6 +6,8 @@
backend.
"""

from datetime import datetime

from mongoengine import BooleanField
from mongoengine import DateTimeField
from mongoengine import Document
Expand All @@ -15,8 +17,6 @@
from mongoengine import ReferenceField
from mongoengine import StringField

from datetime import datetime


class User(Document):
email = StringField(required=True, max_length=50)
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/articles/urls.py
@@ -1,4 +1,4 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import patterns, url
from django.views.generic import ListView

from articles.models import Post
Expand Down
4 changes: 3 additions & 1 deletion examples/blog/manage.py
@@ -1,7 +1,9 @@
#!/usr/bin/env python
from django.core.management import execute_manager
import imp

from django.core.management import execute_manager


# lamo cheat to make work a little easier. Don't do this in other places
import sys
import os
Expand Down
1 change: 1 addition & 0 deletions examples/blog/testrunner.py
Expand Up @@ -2,6 +2,7 @@

from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner

from django_coverage.coverage_runner import CoverageRunner


Expand Down
2 changes: 0 additions & 2 deletions examples/blog_1_7/articles/admin.py
@@ -1,3 +1 @@
from django.contrib import admin

# Register your models here.
4 changes: 2 additions & 2 deletions examples/blog_1_7/articles/models.py
Expand Up @@ -6,6 +6,8 @@
backend.
"""

from datetime import datetime

from mongoengine import BooleanField
from mongoengine import DateTimeField
from mongoengine import Document
Expand All @@ -15,8 +17,6 @@
from mongoengine import ReferenceField
from mongoengine import StringField

from datetime import datetime


class User(Document):
email = StringField(required=True, max_length=50)
Expand Down
2 changes: 2 additions & 0 deletions examples/blog_1_7/articles/tests.py
@@ -1,6 +1,8 @@
import uuid

from django.test import TestCase
from mongoengine import connect, errors

from mongonaut.forms import MongoModelForm
from blog_1_7.settings import MONGO_DATABASE_NAME
from articles.models import User, Comment, Post, OrderedUser
Expand Down
2 changes: 1 addition & 1 deletion examples/blog_1_7/articles/urls.py
@@ -1,4 +1,4 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import patterns, url
from django.views.generic import ListView

from articles.models import Post
Expand Down
1 change: 1 addition & 0 deletions mongonaut/urls.py
@@ -1,4 +1,5 @@
from django.conf.urls import patterns, url

from mongonaut import views

urlpatterns = patterns('',
Expand Down
4 changes: 3 additions & 1 deletion setup.py 100644 → 100755
@@ -1,4 +1,6 @@
import os, sys
import os
import sys

from setuptools import setup, find_packages

import mongonaut
Expand Down
3 changes: 1 addition & 2 deletions tests/common/utils.py
Expand Up @@ -6,8 +6,7 @@
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'examples.blog.settings'

import unittest
from django.test import TestCase, RequestFactory
from django.test import TestCase
from django.conf import settings

from mongoengine import connect
Expand Down
7 changes: 5 additions & 2 deletions tests/sites_tests.py
@@ -1,8 +1,11 @@
#coding: utf-8
import unittest

from django.test import RequestFactory
from mongonaut.sites import BaseMongoAdmin
from common.utils import DummyUser

from mongonaut.sites import BaseMongoAdmin
from common.utils import DummyUser


class BaseMongoAdminTests(unittest.TestCase):

Expand Down
19 changes: 8 additions & 11 deletions tests/url_tests.py
@@ -1,23 +1,20 @@
#coding: utf-8

import unittest
from django.test import RequestFactory
from mongonaut.views import DocumentDetailView
from common.utils import DummyUser

from mongoengine import *

from examples.blog.articles.models import Post, User, NewUser

from mongonaut.templatetags.mongonaut_tags import get_document_value
from bson.objectid import ObjectId

from importlib import import_module

from django.test import RequestFactory
from bson.objectid import ObjectId
from django.core.urlresolvers import NoReverseMatch
from django.conf import settings
import django

from mongonaut.views import DocumentDetailView
from common.utils import DummyUser
from examples.blog.articles.models import Post, NewUser
from mongonaut.templatetags.mongonaut_tags import get_document_value


class IndexViewTests(unittest.TestCase):

def setUp(self):
Expand Down
7 changes: 5 additions & 2 deletions tests/view_tests.py
@@ -1,9 +1,12 @@
#coding: utf-8

import unittest

from django.test import RequestFactory
from mongonaut.views import IndexView
from common.utils import DummyUser

from mongonaut.views import IndexView
from common.utils import DummyUser


class IndexViewTests(unittest.TestCase):

Expand Down

0 comments on commit 99c36d1

Please sign in to comment.