Skip to content

Commit

Permalink
Preparing tuxedo for deployment on new IT machines, including:
Browse files Browse the repository at this point in the history
* Creating a settings-dist.py file for distribution purposes
* Upgrading the settings file for compatibility with Django 1.4.1
* Creating a vendor/ directory to hold Python dependencies
* Adding a requirements file for items that must be compied or added separately

Updating submodule.
  • Loading branch information
brandonsavage committed Sep 20, 2012
1 parent e7474f4 commit 3377c90
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
@@ -0,0 +1,4 @@

[submodule "vendor"]
path = vendor
url = git@github.com:mozilla/tuxedo-lib.git
1 change: 1 addition & 0 deletions apps/users/templates/registration/login.html
Expand Up @@ -6,6 +6,7 @@ <h2>{% block title %}Login{% endblock %}</h2>

<form method="post" action="{% url django.contrib.auth.views.login %}">
<table class="formtable">
{% csrf_token %}
{{ form.as_table }}
</table>

Expand Down
2 changes: 2 additions & 0 deletions requirements/compiled.txt
@@ -0,0 +1,2 @@
MySQL-python==1.2.3c1
python-memcached==1.45
Empty file added requirements/dev.txt
Empty file.
3 changes: 3 additions & 0 deletions requirements/prod.txt
@@ -0,0 +1,3 @@
ipaddr==2.0.0
git+git://github.com/fwenzel/django-mozilla-product-details#egg=django-mozilla-product-details
Markdown==2.0.3
39 changes: 20 additions & 19 deletions settings.py → settings-dist.py
Expand Up @@ -17,17 +17,26 @@

MANAGERS = ADMINS

DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'bouncer.db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.

if (DATABASE_ENGINE == 'mysql'):
DATABASE_OPTIONS = {
"init_command": "SET storage_engine=INNODB",
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'bouncer.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
'OPTIONS': {
'init_command': 'SET storage_engine=InnoDB',
'charset' : 'utf8',
'use_unicode' : True,
},
'TEST_CHARSET': 'utf8',
'TEST_COLLATION': 'utf8_general_ci',
},
# 'slave': {
# ...
# },
}

# Cache Backend. Set up memcache here. Examples:
#CACHE_BACKEND = 'memcached://172.19.26.240:11211;172.19.26.242:11211/'
Expand Down Expand Up @@ -67,19 +76,11 @@
# Make this unique, and don't share it with anybody.
SECRET_KEY = '### change me ###'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
)

# auth backends: uses django first, and converts old Bouncer users as needed
Expand Down
1 change: 1 addition & 0 deletions vendor
Submodule vendor added at 7e8c8a

0 comments on commit 3377c90

Please sign in to comment.