devfzn
ca2156ef37
- Modelo contacto en core/models.py - Creación utils/model_abstracts para heredar y usar id con valor uuid - Serializador en core/serializers hereda de rest_frameworks.serializers - Vista contacto en core/views.py - Registro de app en admin - Migraciones
14 lines
311 B
Python
14 lines
311 B
Python
from django.contrib import admin
|
|
from django.urls import path
|
|
from rest_framework import routers
|
|
from core import views as core_views
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
urlpatterns = router.urls
|
|
|
|
urlpatterns += [
|
|
path('admin/', admin.site.urls),
|
|
path('contact/', core_views.ContactAPIView.as_view()),
|
|
]
|