Skip to content

Commit

Permalink
Clean up remaining uses of syncdb and TEMPLATE_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
mgersh committed Oct 27, 2015
1 parent 9df2ca2 commit e6e3c71
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion deploy/config_templates/local_settings.py
Expand Up @@ -7,7 +7,6 @@
PROJECT_ROOT = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
USE_MAILMAN = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SHOW_TEMPLATE_ERRORS = DEBUG
CACHE_DEBUG = False

Expand Down
1 change: 0 additions & 1 deletion esp/esp/local_settings.py.travis
Expand Up @@ -59,7 +59,6 @@ CLOSURE_COMPILER_PATH = '/usr/lib/closure/bin'
# Debug settings #
###################
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SHOW_TEMPLATE_ERRORS = DEBUG
DEBUG_TOOLBAR = False
USE_PROFILER = False
Expand Down
1 change: 1 addition & 0 deletions esp/esp/settings.py
Expand Up @@ -46,6 +46,7 @@

# Do this here so we have access to PROJECT_ROOT
TEMPLATES[0]['DIRS'].append(os.path.join(PROJECT_ROOT, 'templates'))
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG

# Ensure database settings are set properly
if len(DATABASES['default']['USER']) == 0:
Expand Down
6 changes: 2 additions & 4 deletions esp/esp/utils/management/commands/update.py
Expand Up @@ -39,9 +39,9 @@
class Command(NoArgsCommand):
"""Update the site.
- Sync the database tables.
- Clean out old .pyc files.
- Perform database migrations.
- Install initial data.
- Install initial data (happens automatically after running migrations).
- Collect static files.
- Recompile the theme.
"""
Expand All @@ -55,8 +55,6 @@ def handle_noargs(self, **options):
default_options.update(options)
options = default_options
call_command('clean_pyc', **options)
call_command('syncdb', **options)
call_command('migrate', **options)
call_command('install', **options)
call_command('collectstatic', **options)
call_command('recompile_theme', **options)
3 changes: 1 addition & 2 deletions esp/useful_scripts/server_setup/new_site.sh
Expand Up @@ -302,7 +302,6 @@ LOG_FILE = '$LOGDIR/$SITENAME-django.log'
# Debug settings
DEBUG = False
TEMPLATE_DEBUG = DEBUG
SHOW_TEMPLATE_ERRORS = DEBUG
DEBUG_TOOLBAR = True # set to False to globally disable the debug toolbar
USE_PROFILER = False
Expand Down Expand Up @@ -356,8 +355,8 @@ then
echo "$DBNAME database. Please follow their directions."

cd $BASEDIR/esp/esp
./manage.py syncdb
./manage.py migrate
./manage.py createsuperuser
cd $CURDIR

# Set initial Site (used in password recovery e-mail)
Expand Down
4 changes: 2 additions & 2 deletions fabfile.py
Expand Up @@ -135,10 +135,10 @@ def setup_apache():
fabtools.require.apache.site('devsite', template_source=relative('deploy/config_templates/apache2_vhost.conf'), **context)

def initialize_db():
# Activate virtualenv (should make a context manager)
# Activate virtualenv
with esp_env():
run('python manage.py syncdb')
run('python manage.py migrate')
run('python manage.py createsuperuser')

def link_media():
# Don't do this if the host is Windows (no symlinks).
Expand Down

0 comments on commit e6e3c71

Please sign in to comment.