Browse Source

Configured static files for deployment

pull/87/head^2
Rehema 8 years ago
parent
commit
e8e308224a
2 changed files with 8 additions and 8 deletions
  1. +2
    -8
      hc/settings.py
  2. +6
    -0
      hc/urls.py

+ 2
- 8
hc/settings.py View File

@ -128,15 +128,9 @@ USE_TZ = True
SITE_ROOT = "http://localhost:8000"
PING_ENDPOINT = SITE_ROOT + "/ping/"
PING_EMAIL_DOMAIN = HOST
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'static'),
)
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
# STATIC_URL = '/static/'
# STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
# STATIC_ROOT = os.path.join(BASE_DIR, 'static-collected')
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
STATIC_ROOT = os.path.join(BASE_DIR, 'static-collected')
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',


+ 6
- 0
hc/urls.py View File

@ -1,5 +1,7 @@
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.contrib.staticfiles import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
@ -8,3 +10,7 @@ urlpatterns = [
url(r'^', include('hc.front.urls')),
url(r'^', include('hc.payments.urls'))
]
urlpatterns += [
url(r'^static/?P<path>.*)$', views.serve),
]

Loading…
Cancel
Save