4.[drf] 개발 시작하기
개발
- 개발을 시작하기 위한 기본 뼈대 코드를 작성해보겠습니다.
프로젝트 urls.py
from django.conf import settings
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path(settings.ADMIN_URL, admin.site.urls),
]
python manage.py startapp user
python manage.py startapp common
앱 app.py
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class UserConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'user'
verbose_name = _("User")
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class CommonConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'common'
verbose_name = _("Common")