mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Switch from "import settings" to "from django.conf import settings"
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from hr.app_defines import *
|
from hr.app_defines import *
|
||||||
from hr.models import Application, Audit
|
from hr.models import Application, Audit
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ from django.contrib.auth.models import User, Group
|
|||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
|
from django.conf import settings
|
||||||
import settings
|
|
||||||
|
|
||||||
from eve_api.models import EVEAccount, EVEPlayerCorporation, EVEPlayerCharacter
|
from eve_api.models import EVEAccount, EVEPlayerCorporation, EVEPlayerCharacter
|
||||||
from reddit.models import RedditAccount
|
from reddit.models import RedditAccount
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from celery.decorators import task
|
from celery.decorators import task
|
||||||
from reddit.models import RedditAccount
|
from reddit.models import RedditAccount
|
||||||
from reddit.api import Inbox
|
from reddit.api import Inbox
|
||||||
import settings
|
from django.conf import settings
|
||||||
|
|
||||||
@task(ignore_result=True)
|
@task(ignore_result=True)
|
||||||
def send_reddit_message(to, subject, message):
|
def send_reddit_message(to, subject, message):
|
||||||
|
|||||||
@@ -2,13 +2,12 @@ import re
|
|||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
import settings
|
|
||||||
from eve_api.models import EVEAccount, EVEPlayerCharacter, EVEPlayerCorporation
|
from eve_api.models import EVEAccount, EVEPlayerCharacter, EVEPlayerCorporation
|
||||||
from sso.models import ServiceAccount, Service
|
from sso.models import ServiceAccount, Service
|
||||||
from reddit.models import RedditAccount
|
from reddit.models import RedditAccount
|
||||||
from registration.forms import RegistrationForm
|
from registration.forms import RegistrationForm
|
||||||
from settings import BANNED_EMAIL_DOMAINS
|
|
||||||
|
|
||||||
class RegistrationFormUniqueEmailBlocked(RegistrationForm):
|
class RegistrationFormUniqueEmailBlocked(RegistrationForm):
|
||||||
"""
|
"""
|
||||||
@@ -27,10 +26,11 @@ class RegistrationFormUniqueEmailBlocked(RegistrationForm):
|
|||||||
return self.cleaned_data['email']
|
return self.cleaned_data['email']
|
||||||
|
|
||||||
email_domain = self.cleaned_data['email'].split('@')[1]
|
email_domain = self.cleaned_data['email'].split('@')[1]
|
||||||
if email_domain in BANNED_EMAIL_DOMAINS:
|
if email_domain in settings.BANNED_EMAIL_DOMAINS:
|
||||||
raise forms.ValidationError("Your email provider (%s) is banned from registering, please use a different address.")
|
raise forms.ValidationError("Your email provider (%s) is banned from registering, please use a different address.")
|
||||||
return self.cleaned_data['email']
|
return self.cleaned_data['email']
|
||||||
|
|
||||||
|
|
||||||
class EveAPIForm(forms.Form):
|
class EveAPIForm(forms.Form):
|
||||||
""" EVE API input form """
|
""" EVE API input form """
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ from django.contrib.auth.models import User
|
|||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.core import serializers
|
from django.core import serializers
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
from eve_api.models import EVEAccount, EVEPlayerCharacter
|
from eve_api.models import EVEAccount, EVEPlayerCharacter
|
||||||
from eve_api.tasks import import_apikey, import_apikey_result
|
from eve_api.tasks import import_apikey, import_apikey_result
|
||||||
@@ -23,7 +24,6 @@ from sso.forms import EveAPIForm, UserServiceAccountForm, ServiceAccountResetFor
|
|||||||
|
|
||||||
from reddit.models import RedditAccount
|
from reddit.models import RedditAccount
|
||||||
|
|
||||||
import settings
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
if request.user:
|
if request.user:
|
||||||
|
|||||||
Reference in New Issue
Block a user