Anonymous avatar Anonymous committed 626e0dd

trivial: Some more tweaks in configuration.

- settings.py now has INFO as default level, which is
overriden to DEBUG in settings_local.
- Some more docs for the reader of the files too.

Comments (0)

Files changed (3)

 # Django settings for Transifex.
-# You can override any of these in settings_local.py
+#
+# PREFER TO OVERRIDE ANY OPTIONS IN settings_local.py
+#
+# It helps keeping this file clean with the default values
+# and up to date with newer versions.
 
 import os
 import logging
 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
 
 # The following are usually overridden in settings_local.py
-DEBUG = True
+DEBUG = False
 TEMPLATE_DEBUG = DEBUG
 STATIC_SERVE = True
 
 # Logging level/verbosity.
 # Choices: logging.DEBUG (default), .INFO, .WARNING, .ERROR, .CRITICAL
-LOG_LEVEL = logging.DEBUG
+LOG_LEVEL = logging.INFO
 
 ADMINS = (
     # ('Your Name', 'your_email@domain.com'),
 # and with enough disk space. Eg. /var/lib/transifex.
 SCRATCH_DIR = os.path.join('/var/lib/transifex', 'scratchdir')
 
-# The VCS choices for the system. Enable or disable any VCS types from here.
-# This list also feeds the Unit model with the available options.
+# The following settings define the VCS choices for the system.
+
+# BASIC VCS OPTIONS
+
+# List of VCS types. Also feeds the Unit model with the available options.
 VCS_CHOICES = {'hg': 'Mercurial',}
 
 # Directories where checked-out units will be put. The final location of
             
 Transmitted-via: Transifex (%(domain)s)"""
 
+# ADDITIONAL VCS OPTIONS
+
+VCS_CHOICES.update({'bzr': 'Bazaar',
+                    'cvs': 'CVS',
+                    'git': 'Git',
+                    'svn': 'Subversion',})
+
+REPO_PATHS.update({'bzr': os.path.join(SCRATCH_DIR, 'sources', 'bzr'),
+                   'cvs': os.path.join(SCRATCH_DIR, 'sources', 'cvs'),
+                   'git': os.path.join(SCRATCH_DIR, 'sources', 'git'),
+                   'svn': os.path.join(SCRATCH_DIR, 'sources', 'svn'),})
+
+BROWSER_CLASS_NAMES.update({'bzr': 'vcs.lib.types.bzr.BzrBrowser',
+                            'cvs': 'vcs.lib.types.cvs.CvsBrowser',
+                            'git': 'vcs.lib.types.git.GitBrowser',
+                            'svn': 'vcs.lib.types.svn.SvnBrowser',})
 
 ####################
 # TransHandler settings
 MSGMERGE_DIR = os.path.join(SCRATCH_DIR, 'msgmerge_files')
 
 
-# ADDITIONAL VCS OPTIONS
-
-VCS_CHOICES.update({'bzr': 'Bazaar',
-                    'cvs': 'CVS',
-                    'git': 'Git',
-                    'svn': 'Subversion',})
-
-REPO_PATHS.update({'bzr': os.path.join(SCRATCH_DIR, 'sources', 'bzr'),
-                   'cvs': os.path.join(SCRATCH_DIR, 'sources', 'cvs'),
-                   'git': os.path.join(SCRATCH_DIR, 'sources', 'git'),
-                   'svn': os.path.join(SCRATCH_DIR, 'sources', 'svn'),})
-
-BROWSER_CLASS_NAMES.update({'bzr': 'vcs.lib.types.bzr.BzrBrowser',
-                            'cvs': 'vcs.lib.types.cvs.CvsBrowser',
-                            'git': 'vcs.lib.types.git.GitBrowser',
-                            'svn': 'vcs.lib.types.svn.SvnBrowser',})
-
 # EXTRA LOCAL SETTINGS
 
 # Put any settings specific to the particular host in settings_local.py

settings_debug.py

 LOG_LEVEL = 'DEBUG'
 INTERNAL_IPS = ('127.0.0.1',)
 
-MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware',]
-INSTALLED_APPS += ['debug_toolbar',
-                   'django_evolution',
+#MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware',]
+INSTALLED_APPS += [#'debug_toolbar',    # Useful but a tad heavy.
                    'django_extensions',]

settings_local.py

 """
 Local settings for the project.
 
-These settings complement (and override) those in ``settings.py``,
-by importing them at the end of the file. This means they also
-appear as if they were defined there.
+These settings complement (and override) those in ``settings.py``.
 """
 
-from settings import *
+# Assuming that by default we're having a development environment.
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+LOG_LEVEL = logging.DEBUG
 
-# Email sending
 #EMAIL_HOST = ''
 #EMAIL_HOST_USER = ''
 #EMAIL_HOST_PASSWORD = ''
 
 #SCRATCH_DIR = os.path.join('/tmp', 'scratchdir')
 
+INSTALLED_APPS += ['django_evolution',]
+
 # To enable the use of the notification app on your system:
 #ENABLE_NOTICES = True
-#INSTALLED_APPS += ['django_evolution',]
-
-#MIDDLEWARE_CLASSES += ['txn_stats.middleware.Activity']
 #TEMPLATE_CONTEXT_PROCESSORS += ["notification.context_processors.notification",]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.