Skip to content

Commit

Permalink
Merge pull request #78 from sebastienbarbier/develop
Browse files Browse the repository at this point in the history
Fix broken release 1.2.0
  • Loading branch information
sebastienbarbier committed Apr 25, 2023
2 parents 86a5b4c + 7a1cb84 commit bad67fd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
- name: Run Tests
env: # Set the secret as an input
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ALLOW_ACCOUNT_CREATION: True
run: |
python manage.py test --settings seven23.settings_tests
python manage.py test --settings seven23.settings_tests
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ certifi==2022.12.7
charset-normalizer==3.1.0
colorama==0.4.6
dill==0.3.6
docutils==0.19
docutils==0.18
idna==3.4
imagesize==1.4.1
importlib-metadata==6.4.1
Expand Down Expand Up @@ -46,4 +46,4 @@ typing_extensions==4.5.0
urllib3==1.26.15
watchdog==3.0.0
wrapt==1.15.0
zipp==3.15.0
zipp==3.15.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ django-storages==1.13.2
djangorestframework==3.14.0
djangorestframework-bulk==0.2.1
docopt==0.6.2
docutils==0.19
docutils==0.18
drf-writable-nested==0.7.0
drf-yasg==1.21.5
gunicorn==20.1.0
Expand Down
14 changes: 7 additions & 7 deletions seven23/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
SECRET_KEY = os.environ.get('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DEBUG') == 'True'
MAINTENANCE = os.environ.get('MAINTENANCE') == 'True'
DEBUG = os.environ.get('DEBUG', 'false').lower() == 'true'
MAINTENANCE = os.environ.get('MAINTENANCE', 'false').lower() == 'true'

# Allow public account creation
ALLOW_ACCOUNT_CREATION = os.environ.get('ALLOW_ACCOUNT_CREATION') == 'True'
ALLOW_ACCOUNT_CREATION = os.environ.get('ALLOW_ACCOUNT_CREATION', 'false').lower() == 'true'
OLD_PASSWORD_FIELD_ENABLED = True

APPEND_SLASH = True
ALLOWED_HOSTS = ['*']

SAAS = os.environ.get('SAAS') == 'True'
SAAS = os.environ.get('SAAS', 'false').lower() == 'true'
TRIAL_PERIOD = 30
STRIPE_PUBLIC_KEY = os.environ.get('STRIPE_PUBLIC_KEY')
STRIPE_SECRET_KEY = os.environ.get('STRIPE_SECRET_KEY')
Expand All @@ -70,7 +70,7 @@
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'collectstatic')

if os.environ.get('STORAGE') == 'S3':
if os.environ.get('STORAGE', 'false').lower() == 's3':
# aws settings
AWS_S3_ENDPOINT_URL = os.getenv('AWS_S3_ENDPOINT_URL', "https://cellar-c2.services.clever-cloud.com")
S3_USE_SIGV4 = False
Expand All @@ -87,7 +87,7 @@
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{AWS_LOCATION}/'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATIC_ROOT = os.path.join(BASE_DIR, 'collectstatic')
elif not DEBUG or os.environ.get('STORAGE') == 'whitenoise':
elif not DEBUG or os.environ.get('STORAGE').lower() == 'whitenoise':
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'
MIDDLEWARE = MIDDLEWARE + ('whitenoise.middleware.WhiteNoiseMiddleware',)

Expand Down Expand Up @@ -233,7 +233,7 @@
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = os.environ.get('EMAIL_USE_TLS')

if os.environ.get('EMAIL_BACKEND_CONSOLE') == 'True' or not EMAIL_HOST:
if os.environ.get('EMAIL_BACKEND_CONSOLE', 'false').lower() == 'true' or not EMAIL_HOST:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Internationalization
Expand Down

0 comments on commit bad67fd

Please sign in to comment.