new supervisor step2
This commit is contained in:
@ -18,6 +18,21 @@ from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
|
||||
# debug_urlsビューをrogアプリケーションのviewsからインポート
|
||||
from rog import views as rog_views
|
||||
|
||||
DEBUG = True
|
||||
ALLOWED_HOSTS = ['rogaining.sumasen.net', 'localhost', '127.0.0.1']
|
||||
|
||||
# CORSの設定
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://rogaining.sumasen.net",
|
||||
"http://localhost",
|
||||
"http://127.0.0.1",
|
||||
]
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('auth/', include('knox.urls')),
|
||||
@ -27,3 +42,8 @@ urlpatterns = [
|
||||
admin.site.site_header = "ROGANING"
|
||||
admin.site.site_title = "Roganing Admin Portal"
|
||||
admin.site.index_title = "Welcome to Roganing Portal"
|
||||
|
||||
# 開発環境での静的ファイル配信
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user