Skip to content
Snippets Groups Projects
Commit d7fde305 authored by HeJ's avatar HeJ
Browse files

Merge branch 'develop' into 'production'

prod: remove configtest command (MEDIA_ROOT writeability check)

See merge request hub/hub!533
parents 7281bb6f 5a2a2f6b
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,6 @@ export HOME=/app ...@@ -5,7 +5,6 @@ export HOME=/app
export NUM_WORKERS=$((2 * $(nproc --all))) export NUM_WORKERS=$((2 * $(nproc --all)))
cd $HOME cd $HOME
python3 $HOME/manage.py configtest
if [ "$DJANGO_MIGRATE" == "yes" -o "$STARTMODE" == "init" ]; then if [ "$DJANGO_MIGRATE" == "yes" -o "$STARTMODE" == "init" ]; then
python3 $HOME/manage.py migrate --noinput python3 $HOME/manage.py migrate --noinput
......
import os
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
def handle(self, *args, **options):
# check that media directory is writable
if not os.access(settings.MEDIA_ROOT, os.W_OK):
raise CommandError(f'MEDIA_ROOT is not writable: {settings.MEDIA_ROOT}')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment