mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-16 22:40:26 +00:00
Remove unused imports (#3)
This commit is contained in:
parent
b9e788ab7d
commit
591e4e11b1
9 changed files with 10 additions and 19 deletions
|
|
@ -1,8 +1,8 @@
|
|||
'''Admin. This module contains classes used for admin integration.'''
|
||||
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin.options import (InlineModelAdmin, ModelAdmin,
|
||||
StackedInline)
|
||||
from django.contrib.admin.options import InlineModelAdmin
|
||||
from django.contrib.admin.options import ModelAdmin
|
||||
from django.forms.models import BaseInlineFormSet
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from copy import deepcopy
|
|||
|
||||
from django.contrib.admin.widgets import AdminSplitDateTime
|
||||
from django.forms import (BooleanField, CharField, ChoiceField, DateTimeField,
|
||||
FloatField, IntegerField, ModelForm, ValidationError)
|
||||
FloatField, IntegerField, ModelForm)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ Q-expressions need to be rewritten for two reasons:
|
|||
For details see: ``rewrite_q_expr``.
|
||||
'''
|
||||
|
||||
import sys
|
||||
from functools import reduce, wraps
|
||||
from functools import wraps
|
||||
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
'''Registry. This modules contains the registry classes.'''
|
||||
|
||||
from django.contrib.contenttypes import fields as generic
|
||||
from django.db.models.signals import post_init, post_save, pre_init, pre_save
|
||||
from django.db.utils import DatabaseError
|
||||
from django.db.models.signals import post_init, post_save, pre_save
|
||||
|
||||
from .managers import EntityManager
|
||||
from .models import Attribute, Entity, Value
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import datetime
|
|||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@ from django.core.exceptions import ValidationError
|
|||
from django.contrib.auth.models import User
|
||||
|
||||
import eav
|
||||
from eav.registry import EavConfig
|
||||
from eav.models import Attribute, Value, EnumValue, EnumGroup
|
||||
|
||||
from .models import Patient, Encounter
|
||||
from .models import Patient
|
||||
|
||||
|
||||
class DataValidation(TestCase):
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
from django.contrib.auth.models import User
|
||||
from django.core.exceptions import MultipleObjectsReturned
|
||||
from django.db.models import Q
|
||||
from django.test import TestCase
|
||||
|
||||
import eav
|
||||
from eav.models import Attribute, EnumGroup, EnumValue, Value
|
||||
from eav.registry import EavConfig
|
||||
|
||||
from .models import Encounter, ExampleModel, Patient
|
||||
from .models import Encounter, Patient
|
||||
|
||||
|
||||
class Queries(TestCase):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
from django.test import TestCase
|
||||
|
||||
import eav
|
||||
from eav.registry import Registry, EavConfig
|
||||
from eav.managers import EntityManager
|
||||
from eav.models import Attribute
|
||||
from eav.registry import EavConfig
|
||||
|
||||
from .models import Patient, Encounter, ExampleModel
|
||||
|
||||
|
|
@ -28,7 +26,7 @@ class RegistryTests(TestCase):
|
|||
return 'testing'
|
||||
|
||||
eav.register(Encounter, EncounterEav)
|
||||
|
||||
|
||||
def test_registering_with_defaults(self):
|
||||
eav.register(Patient)
|
||||
self.assertTrue(hasattr(Patient, '_eav_config_cls'))
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
from django.test import TestCase
|
||||
|
||||
import eav
|
||||
from eav.registry import Registry, EavConfig
|
||||
from eav.managers import EntityManager
|
||||
from eav.registry import EavConfig
|
||||
|
||||
from .models import Patient, Encounter
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue