Skip to content

Commit

Permalink
Update settings for static assets. (see #673)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnga committed Jan 24, 2018
1 parent bc0493e commit ea6f8fb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions gobotany/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@
SMART_APPEND_SLASH = True
ROOT_URLCONF = 'gobotany.urls'
INTERNAL_IPS = ('127.0.0.1',)
STATIC_ROOT = ''
STATIC_URL = '/static/'
STATICFILES_DIRS = [('', os.path.join(THIS_DIRECTORY, 'static'))]
MEDIA_ROOT = os.path.join(THIS_DIRECTORY, 'media')
MEDIA_URL = '/media/'
SESSION_COOKIE_AGE = 2 * 24 * 60 * 60 # two days
Expand All @@ -213,6 +210,21 @@
'registration': 'registration.south_migrations',
}


# Static files (CSS, JavaScript, images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'

# Extra places for collectstatic to find static files
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)


# https://docs.djangoproject.com/en/dev/topics/i18n/timezones/#time-zones-faq
TIME_ZONE = 'America/New_York'
USE_TZ = True
Expand Down

0 comments on commit ea6f8fb

Please sign in to comment.