From cc3ded80f6d36e1edc6a9a4593e8775b3dbe9fcb Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 19 Apr 2016 12:24:37 +0200 Subject: [PATCH] rename scripts --- README.rst | 4 ++-- app/middleware.py | 22 ---------------------- scripts/{restore.sh => pull.sh} | 0 scripts/{backup.sh => push.sh} | 0 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 app/middleware.py rename scripts/{restore.sh => pull.sh} (100%) rename scripts/{backup.sh => push.sh} (100%) diff --git a/README.rst b/README.rst index 93bdc578..2e7b1437 100644 --- a/README.rst +++ b/README.rst @@ -45,14 +45,14 @@ Backup / Restore To backup the database, in **another** terminal (or a Docker Quickstart Terminal):: cd Manifeste - scripts/backup.sh + scripts/push.sh giving your user password if asked... To restore the backuped database, in another terminal (or a Docker Quickstart Terminal):: cd Manifeste - scripts/restore.sh + scripts/pull.sh If the app is broken after a restore script, restart the composition with:: diff --git a/app/middleware.py b/app/middleware.py deleted file mode 100644 index 43a158a5..00000000 --- a/app/middleware.py +++ /dev/null @@ -1,22 +0,0 @@ -from django.core.exceptions import MiddlewareNotUsed -from django.conf import settings -from django.core.management import call_command - - -class StartupMiddleware(object): - - def __init__(self): - up = False - print 'check..................................' - while not up: - try: - # # The following db settings name is django 1.2. django < 1.2 will use settings.DATABASE_NAME - # if settings.DATABASES['default']['NAME'] == ':memory:': - call_command('syncdb', interactive=False) - call_command('collectstatic', interactive=False) - up = True - except: - print 'waiting...' - time.sleep(1) - - raise MiddlewareNotUsed('Startup complete') diff --git a/scripts/restore.sh b/scripts/pull.sh similarity index 100% rename from scripts/restore.sh rename to scripts/pull.sh diff --git a/scripts/backup.sh b/scripts/push.sh similarity index 100% rename from scripts/backup.sh rename to scripts/push.sh -- 2.39.5