Skip to content

Commit

Permalink
rename default AppConfig to make settings delaration more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Aug 5, 2016
1 parent 513c8f4 commit 83790b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion django_crypto_fields/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'django_crypto_fields.apps.DjangoCryptoFieldsConfig'
8 changes: 4 additions & 4 deletions django_crypto_fields/apps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys

from Crypto.Cipher import AES
from django.apps import AppConfig
from django.apps import AppConfig as DjangoAppConfig
from django.core.management.color import color_style
from django_crypto_fields.cryptor import Cryptor

Expand All @@ -12,7 +12,7 @@ class DjangoCryptoFieldsError(Exception):
style = color_style()


class DjangoCryptoFieldsAppConfig(AppConfig):
class AppConfig(DjangoAppConfig):
name = 'django_crypto_fields'
verbose_name = "Data Encryption"
encryption_keys = None
Expand All @@ -22,7 +22,7 @@ class DjangoCryptoFieldsAppConfig(AppConfig):
def __init__(self, app_label, model_name):
"""Placed here instead of `ready()`. For models to load correctly that use
field classes from this module the keys need to be loaded before models."""
super(DjangoCryptoFieldsAppConfig, self).__init__(app_label, model_name)
super(AppConfig, self).__init__(app_label, model_name)
from django_crypto_fields.keys import Keys
keys = Keys()
if not self.encryption_keys:
Expand All @@ -48,6 +48,6 @@ def ready(self):
' in pycrypto.blockalgo.py.\n'))


class TestDjangoCryptoFieldsApp(DjangoCryptoFieldsAppConfig):
class TestDjangoCryptoFieldsApp(AppConfig):
name = 'django_crypto_fields'
model = ('example', 'crypt')

0 comments on commit 83790b1

Please sign in to comment.