diff --git a/deploy/config_templates/local_settings.py b/deploy/config_templates/local_settings.py index 6386b6a44b..089474a6fe 100644 --- a/deploy/config_templates/local_settings.py +++ b/deploy/config_templates/local_settings.py @@ -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 diff --git a/esp/esp/local_settings.py.travis b/esp/esp/local_settings.py.travis index b3367497bb..8a4c159dda 100644 --- a/esp/esp/local_settings.py.travis +++ b/esp/esp/local_settings.py.travis @@ -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 diff --git a/esp/esp/settings.py b/esp/esp/settings.py index 611b62c231..cd491a9665 100644 --- a/esp/esp/settings.py +++ b/esp/esp/settings.py @@ -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: diff --git a/esp/esp/utils/management/commands/update.py b/esp/esp/utils/management/commands/update.py index de8eda2431..e0162e989d 100644 --- a/esp/esp/utils/management/commands/update.py +++ b/esp/esp/utils/management/commands/update.py @@ -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. """ @@ -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) diff --git a/esp/useful_scripts/server_setup/new_site.sh b/esp/useful_scripts/server_setup/new_site.sh index 175b31837a..3729f743e1 100644 --- a/esp/useful_scripts/server_setup/new_site.sh +++ b/esp/useful_scripts/server_setup/new_site.sh @@ -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 @@ -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) diff --git a/fabfile.py b/fabfile.py index 903bdbe3d6..e3ff39b79b 100755 --- a/fabfile.py +++ b/fabfile.py @@ -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).