Created
August 21, 2018 13:04
-
-
Save Jungwoo-An/9cb055a5ec0328b3d4803606de124df4 to your computer and use it in GitHub Desktop.
Django spa config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STATIC_URL = '/static/' | |
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) | |
TEMPLATES = [ | |
{ | |
'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
'DIRS': [os.path.join(BASE_DIR, 'static')], | |
'APP_DIRS': True, | |
'OPTIONS': { | |
'context_processors': [ | |
'django.template.context_processors.debug', | |
'django.template.context_processors.request', | |
'django.contrib.auth.context_processors.auth', | |
'django.contrib.messages.context_processors.messages', | |
], | |
}, | |
}, | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urlpatterns = [ | |
path('api/', lambda request: HttpResponse('API')), | |
url(r'.*', TemplateView.as_view(template_name='index.html')), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment