Browse files

Preparing tuxedo for deployment on new IT machines, including:

* 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...
1 parent e7474f4 commit 3377c90fa54af62f69db99c91b69f6c6b9aac379 @brandonsavage brandonsavage committed Sep 20, 2012
View
4 .gitmodules
@@ -0,0 +1,4 @@
+
+[submodule "vendor"]
+ path = vendor
+ url = git@github.com:mozilla/tuxedo-lib.git
View
1 apps/users/templates/registration/login.html
@@ -6,6 +6,7 @@
<form method="post" action="{% url django.contrib.auth.views.login %}">
<table class="formtable">
+ {% csrf_token %}
{{ form.as_table }}
</table>
View
2 requirements/compiled.txt
@@ -0,0 +1,2 @@
+MySQL-python==1.2.3c1
+python-memcached==1.45
View
0 requirements/dev.txt
No changes.
View
3 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
View
39 settings.py → settings-dist.py
@@ -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/'
@@ -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
1 vendor
@@ -0,0 +1 @@
+Subproject commit 7e8c8af20be23879692dc46d26ff29abd4fa30f1

0 comments on commit 3377c90

Please sign in to comment.