Skip to content
Browse files

move get_secret_word_as_md5 to settings cuz it breaks setup

  • Loading branch information...
1 parent 2e83fcc commit 93b9a5bd1eb7ad219e3e70a3e5b7841fca09b61e @Akuryou Akuryou committed Dec 5, 2012
Showing with 11 additions and 14 deletions.
  1. +0 −11 skrill/__init__.py
  2. +1 −1 skrill/models.py
  3. +8 −0 skrill/settings.py
  4. +1 −1 skrill/tests/factories.py
  5. +1 −1 skrill/tests/views_tests.py
View
11 skrill/__init__.py
@@ -1,13 +1,2 @@
-import hashlib
-
-from settings import SECRET_WORD
-
-
__version__ = '0.1.0'
-def get_secret_word_as_md5():
- """returns md5 hash of SECRET_WORD in upper case"""
- m = hashlib.md5()
- m.update(SECRET_WORD)
- return m.hexdigest().upper()
-
View
2 skrill/models.py
@@ -6,7 +6,7 @@
from django.db import models
import django.dispatch
-from skrill import get_secret_word_as_md5
+from skrill.settings import get_secret_word_as_md5
from skrill.settings import *
View
8 skrill/settings.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
+import hashlib
+
from django.conf import settings
# settings that normaly need no change
@@ -8,6 +10,12 @@
PAY_TO_EMAIL = getattr(settings, "SKRILL_PAY_TO_EMAIL", None)
SECRET_WORD = getattr(settings, "SKRILL_SECRET_WORD", '')
+def get_secret_word_as_md5():
+ """returns md5 hash of SECRET_WORD in upper case"""
+ m = hashlib.md5()
+ m.update(SECRET_WORD)
+ return m.hexdigest().upper()
+
# optional default settings
RECIPIENT_DESCRIPTION = getattr(settings, "SKRILL_RECIPIENT_DESCRIPTION", None)
RETURN_URL = getattr(settings, "SKRILL_RETURN_URL", None)
View
2 skrill/tests/factories.py
@@ -6,7 +6,7 @@
import factory
-from skrill import get_secret_word_as_md5
+from skrill.settings import get_secret_word_as_md5
from skrill.models import PaymentRequest, StatusReport
from skrill.settings import *
View
2 skrill/tests/views_tests.py
@@ -3,7 +3,7 @@
from django.test import TestCase
from django.core.urlresolvers import reverse
-from skrill import get_secret_word_as_md5
+from skrill.settings import get_secret_word_as_md5
from skrill.tests.factories import PaymentRequestFactory
from skrill.settings import *

0 comments on commit 93b9a5b

Please sign in to comment.
Something went wrong with that request. Please try again.