add index
This commit is contained in:
parent
8068157971
commit
73bb04d597
@ -1,14 +1,21 @@
|
|||||||
# main/urls.py
|
# main/urls.py
|
||||||
from .views import create_project, project_dashboard, create_task
|
from .views import index, create_project, project_dashboard, create_task
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from rest_framework.routers import DefaultRouter
|
from rest_framework.routers import DefaultRouter
|
||||||
from .api_views import ProjectViewSet, TaskViewSet
|
from .api_views import ProjectViewSet, TaskViewSet
|
||||||
|
from django. urls import path
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns=[
|
||||||
|
path('',views.index,name='index')
|
||||||
|
]
|
||||||
|
|
||||||
router = DefaultRouter()
|
router = DefaultRouter()
|
||||||
router.register(r'projects', ProjectViewSet)
|
router.register(r'projects', ProjectViewSet)
|
||||||
router.register(r'tasks', TaskViewSet)
|
router.register(r'tasks', TaskViewSet)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
path ('', index, name='index'),
|
||||||
path('api/', include(router.urls)),
|
path('api/', include(router.urls)),
|
||||||
path('projects/create/', create_project, name='create_project'),
|
path('projects/create/', create_project, name='create_project'),
|
||||||
path('projects/<int:project_id>/', project_dashboard, name='project_dashboard'),
|
path('projects/<int:project_id>/', project_dashboard, name='project_dashboard'),
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('accounts/', include('accounts.urls')),
|
path('accounts/', include('accounts.urls')),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user