Skip to content

Commit

Permalink
Merge 3749f2b into 2cd3aac
Browse files Browse the repository at this point in the history
  • Loading branch information
overshard committed Dec 1, 2017
2 parents 2cd3aac + 3749f2b commit d54ed49
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions babybuddy/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@

WHITENOISE_ROOT = os.path.join(BASE_DIR, 'static', 'root')

ALLOW_UPLOADS = os.environ.get('ALLOW_UPLOADS', True)


# Django Rest Framework
# http://www.django-rest-framework.org/#
Expand All @@ -165,5 +163,6 @@

BABY_BUDDY = {
'NAP_START_MIN': os.environ.get('NAP_START_MIN', '06:00'),
'NAP_START_MAX': os.environ.get('NAP_START_MAX', '18:00')
'NAP_START_MAX': os.environ.get('NAP_START_MAX', '18:00'),
'ALLOW_UPLOADS': os.environ.get('ALLOW_UPLOADS', True)
}
2 changes: 1 addition & 1 deletion babybuddy/settings/eb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .base import *


ALLOW_UPLOADS = os.environ.get('ALLOW_UPLOADS', False)
BABY_BUDDY['ALLOW_UPLOADS'] = os.environ.get('ALLOW_UPLOADS', False)


# Database
Expand Down
2 changes: 1 addition & 1 deletion babybuddy/settings/heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .base import *


ALLOW_UPLOADS = os.environ.get('ALLOW_UPLOADS', False)
BABY_BUDDY['ALLOW_UPLOADS'] = os.environ.get('ALLOW_UPLOADS', False)


# Database
Expand Down
2 changes: 1 addition & 1 deletion core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ChildAdmin(admin.ModelAdmin):
list_filter = ('last_name',)
search_fields = ('first_name', 'last_name', 'birth_date')
fields = ['first_name', 'last_name', 'birth_date']
if settings.ALLOW_UPLOADS:
if settings.BABY_BUDDY['ALLOW_UPLOADS']:
fields.append('picture')


Expand Down
2 changes: 1 addition & 1 deletion core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Meta:
'last_name',
'birth_date'
]
if settings.ALLOW_UPLOADS:
if settings.BABY_BUDDY['ALLOW_UPLOADS']:
fields.append('picture')
widgets = {
'birth_date': forms.DateInput(attrs={
Expand Down

0 comments on commit d54ed49

Please sign in to comment.