Django urls.py 셋팅
2021. 4. 6. 23:41ㆍ파이썬/Django
project : mysite
app : mp3
mp3/urls.py
from django.urls import path
from . import views
app_name = 'mp3'
urlpatterns = [
path('', views.index, name='index'),
]
mysite/urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('mp3/', include('mp3.urls')),
]
'파이썬 > Django' 카테고리의 다른 글
NoReverseMatch : Reverse for 'download' not found. 'download' is not a valid view function or pattern name. (0) | 2021.04.10 |
---|---|
The current path, mp3/, didn't match any of these. (0) | 2021.04.06 |
Django project 생성 (0) | 2021.04.06 |
Django filter count() (0) | 2021.04.04 |
django.db.utils.OperationalError: user-defined function raised exception (0) | 2021.04.04 |