Commits

Tyler Butler  committed 3597c4d

Minor cleanup.

  • Participants
  • Parent commits c201e58

Comments (0)

Files changed (15)

File PROJECT_ROOT/__init__.py

-__author__ = 'tyler@tylerbutler.com'

File PROJECT_ROOT/requirements.txt

 django-debug-toolbar
 django-grappelli
 
+-e hg+https://tylerbutler@bitbucket.org/tylerbutler/django-potpourri#egg=potpourri
+
 # Add your additional requirements here

File PROJECT_ROOT/requirements_optional.txt

 # Optional requirements
 
 # Only required if you're using nose for unit tests
-django-nose
+# django-nose
 
 # Only required to generate documentation
-sphinx
+# sphinx

File PROJECT_ROOT/settings/__init__.py

 from production import *
-
-__author__ = 'tyler@tylerbutler.com'

File PROJECT_ROOT/settings/common.py

 import sys, platform
 from path import path
+from potpourri.functions import add_to_path_if_needed
 
-__author__ = 'tyler@tylerbutler.com'
 
 '''
 This settings file contains all the common settings that should be more or less the same between environments
 SITE_ROOT = PROJECT_ROOT.dirname()
 WEB_ROOT = SITE_ROOT
 
-sys.path.append(SITE_ROOT)
-sys.path.append(PROJECT_ROOT / 'apps')
-sys.path.append(PROJECT_ROOT / 'libs')
+add_to_path_if_needed(SITE_ROOT)
+add_to_path_if_needed(PROJECT_ROOT / 'apps')
+add_to_path_if_needed(PROJECT_ROOT / 'libs')
 ### END PATHS ###
 
 #SITE_ID = 1

File PROJECT_ROOT/settings/development.py

 
 CACHE_MIDDLEWARE_ALIAS = 'dummy' # disable caching by using the dummy cache middleware for local development
 
-### django-compress ###
-COMPRESS_CACHE_BACKEND = CACHE_MIDDLEWARE_ALIAS
-### END django-compress ###
-
 ### DEBUG_TOOLBAR ###
 INSTALLED_APPS += (
     'debug_toolbar',

File PROJECT_ROOT/settings/development_remote.py

+from development import *
+
+
+'''
+This settings file is used to do remote dev testing against a remote Apache server.
+
+It imports the 'development' settings.
+'''
+
+# Customize your remote development settings

File PROJECT_ROOT/settings/production.py

 from common import *
 
-__author__ = 'tyler@tylerbutler.com'
-
 '''
 This settings file is used to configure a production environment. Any changes to it should first be done in a staging
 environment.

File PROJECT_ROOT/settings/staging.py

 from production import *
 
-__author__ = 'tyler@tylerbutler.com'
-
 '''
 This settings file is used to configure a staging environment. It is meant to be as close to production as is
 reasonable but uses a separate database. This settings file can be tweaked as needed when diagnosing

File PROJECT_ROOT/urls.py

 from django.conf.urls.defaults import *
 from django.contrib import admin
 
-__author__ = 'tyler@tylerbutler.com'
-
 admin.autodiscover()
 
 urlpatterns = patterns('',

File PROJECT_ROOT/wsgi/_monitor.py

 import Queue
 from path import path as pathpy
 
-__author__ = 'tyler@tylerbutler.com'
-
 _interval = 1.0
 _times = {}
 _files = []

File PROJECT_ROOT/wsgi/development.wsgi

 import site, os, sys
 
-__author__ = 'tyler@tylerbutler.com'
-
 # Tell wsgi to add the virtualenvs Python site-packages to its path.
 #site.addsitedir('/home/tylerbutler/.virtualenvs/tylerbutlercom/lib/python2.7/site-packages')
 

File PROJECT_ROOT/wsgi/production.wsgi

 import site, os, sys
 
-__author__ = 'tyler@tylerbutler.com'
-
 # Tell wsgi to add the virtualenvs Python site-packages to its path.
 #site.addsitedir('/home/tylerbutler/.virtualenvs/tylerbutlercom/lib/python2.7/site-packages')
 

File PROJECT_ROOT/wsgi/staging.wsgi

 import site, os, sys
 
-__author__ = 'tyler@tylerbutler.com'
-
 # Tell wsgi to add the virtualenvs Python site-packages to its path.
 #site.addsitedir('/home/tylerbutler/.virtualenvs/tylerbutlercom/lib/python2.7/site-packages')
 

File PROJECT_ROOT/wsgi/wsgi_common.py

         pass
 
     return application
-#def setup(filename):
-#	project_root = os.sep.join(filename.split(os.sep)[:-2])
-#	project_dir = None
-#
-#	for path in os.listdir(project_root):
-#		# Find each dir off the root, and check it for settings.py
-#
-#		path = os.path.join(project_root, path)
-#
-#		if os.path.isdir(path):
-#			file = "".join([path, os.sep, "settings.py"])
-#			if os.path.exists(file):
-#				# We have found /project_name/settings.py
-#				project_dir = path
-#				os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % path.split(os.sep)[-1]
-#
-#	if not project_dir:
-#		raise Exception("Could not find project settings file! Checked path: %s" % path)
-#
-#	if project_root not in sys.path: sys.path.insert(0, project_root)
-#	if project_dir not in sys.path: sys.path.insert(0, project_dir)
-#
-#	return django.core.handlers.wsgi.WSGIHandler()