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')),
]