|
@@ -1,12 +1,9 @@
|
1
|
1
|
import logging
|
|
2
|
+from django.conf import settings
|
2
|
3
|
from django.contrib.auth.signals import user_logged_in, user_logged_out, user_login_failed
|
3
|
4
|
from django.dispatch import receiver
|
4
|
5
|
|
5
|
|
-try:
|
6
|
|
- from config import APP_NAME as ROOT_LOGGER_NAME
|
7
|
|
-except ImportError:
|
8
|
|
- ROOT_LOGGER_NAME = 'root'
|
9
|
|
-logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
|
6
|
+logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
|
10
|
7
|
|
11
|
8
|
|
12
|
9
|
@receiver(user_logged_in)
|