diff --git a/app/conf/brokersettings.py.example b/app/conf/brokersettings.py.example deleted file mode 100644 index 51c917a..0000000 --- a/app/conf/brokersettings.py.example +++ /dev/null @@ -1,6 +0,0 @@ -BROKER_HOST = "localhost" -BROKER_PORT = 5672 -BROKER_USER = "%(user)s" -BROKER_PASSWORD = "%(password)s" -BROKER_VHOST = "%(vhost)s" - diff --git a/app/settings.py b/app/conf/common.py old mode 100755 new mode 100644 similarity index 65% rename from app/settings.py rename to app/conf/common.py index f9b5207..5566bb9 --- a/app/settings.py +++ b/app/conf/common.py @@ -4,7 +4,7 @@ from datetime import timedelta # Django settings for login project. -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG INTERNAL_IPS = ('127.0.0.1','91.121.180.45') @@ -14,27 +14,10 @@ ADMINS = ( MANAGERS = ADMINS -# Import db settings from dbsettings.py -from conf.dbsettings import * - -# Import the Broker settings -from conf.brokersettings import * - -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# If running in a Windows environment this must be set to the same as your -# system time zone. +# Zone Settings TIME_ZONE = 'UTC' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-us' - SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. USE_I18N = True # Defines the Static Media storage as per staticfiles contrib @@ -43,7 +26,7 @@ STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' # Make this unique, and don't share it with anybody. -SECRET_KEY = '8i2+dd-b2tg9g%mq$&i$-8beh4i5^2mm=e-nh^$p47^w=z1igr' +SECRET_KEY = '' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( @@ -104,67 +87,14 @@ INSTALLED_APPS = ( 'tools', ) -## Server Mail -SERVER_EMAIL = 'trace@auth.pleaseignore.com' - -# API OAuth -#OAUTH_AUTH_VIEW = 'api.views.oauth.authorize_oauth' -OAUTH_CALLBACK_VIEW = 'api.views.oauth_callback' - -# Disable the service API, used for data imports -DISABLE_SERVICES = False - -# Services API generates a new password for the user -GENERATE_SERVICE_PASSWORD = False - AUTHENTICATION_BACKENDS = ( 'sso.backends.SimpleHashModelBackend', ) - AUTH_PROFILE_MODULE = 'sso.SSOUser' LOGIN_REDIRECT_URL = "/profile" LOGIN_URL = "/login" -DEFAULT_FROM_EMAIL = "bot@auth.pleaseignore.com" -ACCOUNT_ACTIVATION_DAYS = 14 - -# Slice File Location -SLICE = os.path.join(os.path.dirname(os.path.abspath( __file__ )),'Murmur.ice') - -### Reddit Settings - -# Username to validate accounts from -REDDIT_USER = 'DredditVerification' - -# Password for validatio account -REDDIT_PASSWORD = '' - -### HR Settings - -HR_RECOMMENDATION_DAYS = 45 - -FULL_API_USER_ID = 415631 -FULL_API_CHARACTER_ID = 246102445 - -## Email Registration - -BANNED_EMAIL_DOMAINS = ['att.net'] - -## Eve Proxy settings - -EVE_PROXY_KEEP_LOGS = 30 - -## Director management settings - -IGNORE_CORP_GROUPS = [29] - -# try and import local settings -try: - from conf.settingslocal import * -except: - pass - ### Celery Schedule CELERYBEAT_SCHEDULE = { diff --git a/app/conf/dbsettings.py.example b/app/conf/dbsettings.py.example deleted file mode 100644 index c257db3..0000000 --- a/app/conf/dbsettings.py.example +++ /dev/null @@ -1,8 +0,0 @@ -DATABASES = { - 'default': { - 'NAME': 'dreddit_sso.db', - 'ENGINE': 'django.db.backends.sqlite3', - 'USER': '', - 'PASSWORD': '', - } -} diff --git a/app/conf/development.py b/app/conf/development.py new file mode 100644 index 0000000..c3219e8 --- /dev/null +++ b/app/conf/development.py @@ -0,0 +1,44 @@ +from common import * + +## Database +DATABASES = { + 'default': { + 'NAME': 'dreddit_sso.db', + 'ENGINE': 'django.db.backends.sqlite3', + 'USER': '', + 'PASSWORD': '', + }, + +} + +## EVE Proxy +EVE_API_URL = "http://apitest.eveonline.com" +EVE_PROXY_KEEP_LOGS = 30 + +## SSO +DISABLE_SERVICES = False +GENERATE_SERVICE_PASSWORD = False +IGNORE_CORP_GROUPS = [29] + +## Server Mail +SERVER_EMAIL = 'trace@auth.pleaseignore.com' +DEFAULT_FROM_EMAIL = "bot@auth.pleaseignore.com" + +## Registration +ACCOUNT_ACTIVATION_DAYS = 14 +BANNED_EMAIL_DOMAINS = ['att.net'] + +## Reddit +REDDIT_USER = 'DredditVerification' +REDDIT_PASSWORD = '' + +## HR +HR_RECOMMENDATION_DAYS = 45 + +## API +FULL_API_USER_ID = 415631 +FULL_API_CHARACTER_ID = 246102445 + +## Django +DEBUG = True +SECRET_KEY = '8i2+dd-b2tg9g%mq$&i$-8beh4i5^2mm=e-nh^$p47^w=z1igr' diff --git a/app/eve_proxy/models.py b/app/eve_proxy/models.py index 4ef6569..fff6ff7 100755 --- a/app/eve_proxy/models.py +++ b/app/eve_proxy/models.py @@ -5,8 +5,8 @@ import socket from datetime import datetime, timedelta from xml.dom import minidom from django.db import models +from django.conf import settings from eve_proxy.exceptions import * -import settings # You generally never want to change this unless you have a very good reason. diff --git a/app/manage.py b/app/manage.py index 8121562..83d5ca1 100755 --- a/app/manage.py +++ b/app/manage.py @@ -12,11 +12,11 @@ except IOError: from django.core.management import execute_manager try: - import settings # Assumed to be in the same directory. + import conf.development # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) sys.exit(1) if __name__ == "__main__": - execute_manager(settings) + execute_manager(conf.development) diff --git a/app/sso/services/__init__.py b/app/sso/services/__init__.py index 1ebf8e7..bb57564 100644 --- a/app/sso/services/__init__.py +++ b/app/sso/services/__init__.py @@ -1,4 +1,4 @@ -import settings +from django.conf import settings from django.db import connections def get_api(api): diff --git a/app/sso/services/ipb/__init__.py b/app/sso/services/ipb/__init__.py index 423fbd0..8714978 100644 --- a/app/sso/services/ipb/__init__.py +++ b/app/sso/services/ipb/__init__.py @@ -1,6 +1,6 @@ import xmlrpclib from sso.services import BaseService -import settings +from django.conf import settings from hashlib import md5 class IPBService(BaseService): diff --git a/app/sso/services/jabber/__init__.py b/app/sso/services/jabber/__init__.py index 76884ed..8ddc4e9 100644 --- a/app/sso/services/jabber/__init__.py +++ b/app/sso/services/jabber/__init__.py @@ -1,6 +1,6 @@ import xmlrpclib from sso.services import BaseService -import settings +from django.conf import settings class JabberService(BaseService): diff --git a/app/sso/services/miningbuddy/__init__.py b/app/sso/services/miningbuddy/__init__.py index 8f2ab42..41633b0 100644 --- a/app/sso/services/miningbuddy/__init__.py +++ b/app/sso/services/miningbuddy/__init__.py @@ -3,7 +3,7 @@ import random import time from django.db import transaction from sso.services import BaseDBService -import settings +from django.conf import settings class MiningBuddyService(BaseDBService): """ diff --git a/app/sso/services/phpbb/__init__.py b/app/sso/services/phpbb/__init__.py index 67b8372..9676d3e 100644 --- a/app/sso/services/phpbb/__init__.py +++ b/app/sso/services/phpbb/__init__.py @@ -2,7 +2,7 @@ import hashlib import random from django.db import load_backend, transaction, IntegrityError from sso.services import BaseDBService -import settings +from django.conf import settings class PhpBBService(BaseDBService): """ diff --git a/app/sso/services/postracker/__init__.py b/app/sso/services/postracker/__init__.py index 6b1b875..04a880f 100644 --- a/app/sso/services/postracker/__init__.py +++ b/app/sso/services/postracker/__init__.py @@ -2,7 +2,7 @@ import hashlib import random from django.db import transaction, IntegrityError from sso.services import BaseDBService -import settings +from django.conf import settings class POSTrackerService(BaseDBService): """ diff --git a/app/sso/services/qms/__init__.py b/app/sso/services/qms/__init__.py index eb5057a..3786194 100644 --- a/app/sso/services/qms/__init__.py +++ b/app/sso/services/qms/__init__.py @@ -2,7 +2,7 @@ import hashlib import random from django.db import load_backend, transaction, IntegrityError from sso.services import BaseDBService -import settings +from django.conf import settings class QMSService(BaseDBService): """ diff --git a/app/sso/services/smf/__init__.py b/app/sso/services/smf/__init__.py index 3fa8f2a..6580f17 100644 --- a/app/sso/services/smf/__init__.py +++ b/app/sso/services/smf/__init__.py @@ -1,7 +1,7 @@ import hashlib import random from sso.services import BaseDBService -import settings +from django.conf import settings class SMFService(BaseDBService): """ diff --git a/app/sso/services/wiki/__init__.py b/app/sso/services/wiki/__init__.py index 978d203..6aa5542 100644 --- a/app/sso/services/wiki/__init__.py +++ b/app/sso/services/wiki/__init__.py @@ -2,7 +2,7 @@ import hashlib import random from django.db import load_backend, transaction, IntegrityError from sso.services import BaseDBService -import settings +from django.conf import settings class MediawikiService(BaseDBService): """ diff --git a/app/tools/management/commands/munin.py b/app/tools/management/commands/munin.py index b5ba268..f3b9137 100644 --- a/app/tools/management/commands/munin.py +++ b/app/tools/management/commands/munin.py @@ -12,7 +12,7 @@ execfile(activate_this, dict(__file__=activate_this)) import sys import logging from django.core.management import setup_environ -import settings +from django.conf import settings setup_environ(settings) diff --git a/app/tools/management/commands/ts3remove.py b/app/tools/management/commands/ts3remove.py index a00ed51..4b79544 100644 --- a/app/tools/management/commands/ts3remove.py +++ b/app/tools/management/commands/ts3remove.py @@ -13,7 +13,7 @@ execfile(activate_this, dict(__file__=activate_this)) import sys import logging from django.core.management import setup_environ -import settings +from django.conf import settings setup_environ(settings) diff --git a/fabfile.py b/fabfile.py index 8c76e62..9e7125c 100644 --- a/fabfile.py +++ b/fabfile.py @@ -137,6 +137,8 @@ def update_repo(): with cd('%(path)s/dreddit-auth/' % env): run('git pull') + deploy_static() + def reset_repo(): """