You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
6.5 KiB
Python

"""osinaweb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from osinacore import views
from django.contrib.auth.decorators import login_required
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
# Pages urls
path('admin/', admin.site.urls),
path('login', views.signin, name='signin'),
path('logout/', views.signout, name='signout'),
path('', login_required(views.home), name='home'),
path('my-projects/', login_required(views.my_projects), name='my-projects'),
path('my-tasks/', login_required(views.my_tasks), name='my-tasks'),
path('customers/', views.customers, name='customers'),
path('addcustomer/', views.add_customer, name='addcustomer'),
path('customerdetails/<str:customer_id>/', views.customerdetails, name='customerdetails'),
path('addbusiness/', views.addbusiness, name='addbusiness'),
path('businessdetails/<str:business_id>/', views.businessdetails, name='businessdetails'),
path('businesses/', views.businesses, name='businesses'),
path('addstaff/', views.addstaff, name='adduser'),
path('staffdetails/<str:staff_id>/', views.staffdetails, name='userdetails'),
path('staffs/', views.staffs, name='users'),
path('staffpositions/', views.staff_positions, name='staffpositions'),
path('projectdetails/<str:project_id>/', views.detailed_project, name='detailed-project'),
path('createproject/', views.create_project, name='createproject'),
path('createepic/<str:project_id>/', views.create_epic, name='createepic'),
path('createtask/', views.create_task, name='createtask'),
path('createtask/<str:project_id>/', views.createtask_project, name='createtaskproject'),
path('createtaskepic/', views.createtask_epic, name='createtaskepic'),
path('taskdetails/<str:task_id>/', views.detailed_task, name='detailed-task'),
path('projecttypes/', views.project_types, name='projecttypes'),
path('references/', views.references, name='references'),
path('tags/', views.tags, name='tags'),
path('dailyreports/', views.daily_reports, name='dailyreports'),
path('adddailyreport/', views.add_daily_report, name='adddailyreport'),
#Fetch urls
path("fetch_related_tasks/", views.fetch_related_tasks, name="fetch_related_tasks"),
# Modals urls
path('addstatus/', views.add_status_modal, name='addstatus'),
path('addnote/', views.add_note_modal, name='addnote'),
path('addfile/', views.add_file_modal, name='addfile'),
path('addcredentials/', views.add_credentials_modal, name='addcredentials'),
path('updatestatus/<str:task_id>/', views.update_status_modal, name='updatestatus'),
path('addpoint/<str:task_id>/', views.add_point_modal, name='addpoint'),
path('showpoints/<str:task_id>/', views.show_points_modal, name='showpoints'),
path('addtime/', views.add_time_modal, name='addtime'),
path('timeline/', views.timeline_modal, name='timeline'),
path('deletetask/', views.delete_task_modal, name='deletetask'),
path('addprojecttype/', views.add_projecttype_modal, name='addprojecttype'),
path('addreference/', views.add_reference_modal, name='addreference'),
path('addtag/', views.add_tag_modal, name='addtag'),
path('addbusinesscustomer/', views.add_business_modal, name='addbusinesscustomer'),
path('addstaffposition/', views.staff_position_modal, name='addstaffposition'),
# Save Urls
path('save_note/', views.save_note, name='save_note'),
path('save_project/', views.save_project, name='save_project'),
path('save_epic/', views.save_epic, name='save_epic'),
path('save_task/', views.save_task, name='save_task'),
path('save_business/', views.save_business, name='save_business'),
path('save_business_modal/', views.save_business_modal, name='save_business_modal'),
path('save_customer/', views.save_customer, name='save_customer'),
path('save_staff/', views.save_staff, name='save_staff'),
path('save_status/', views.save_status, name='save_status'),
path('save_projecttype/', views.save_projecttype, name='save_projecttype'),
path('save_reference/', views.save_reference, name='save_reference'),
path('save_tag/', views.save_tag, name='save_tag'),
path('save_point/', views.save_point, name='save_point'),
path('save_staffposition/', views.save_staffposition, name='save_staffposition'),
path('save_dailyreport/', views.save_dailyreport, name='save_dailyreport'),
# Edit Urls
path('editproject/', views.edit_project, name='editproject'),
path('editepic/', views.edit_epic, name='editepic'),
path('edittask/', views.edit_task, name='edittask'),
path('editcustomer/', views.edit_customer, name='editcustomer'),
path('editbusiness/', views.edit_business, name='editbusiness'),
path('editstaff/', views.edit_staff, name='editstaff'),
path('editprojecttype/<int:projecttype_id>', views.edit_project_type, name='editprojecttype'),
path('editreference/<int:reference_id>', views.edit_reference, name='editreference'),
path('edittag/<int:tag_id>', views.edit_tag, name='edittag'),
path('editstaffposition/', views.edit_staff_position, name='editstaffposition'),
path('mark_point_working_on/<int:point_id>/<str:task_id>/', views.mark_point_working_on, name='mark_point_working_on'),
path('mark_point_working_on_task_page/<int:point_id>/<str:task_id>/', views.mark_point_working_on_task_page, name='mark_point_working_on_task_page'),
path('mark_point_completed/<int:point_id>/<str:task_id>/', views.mark_point_completed, name='mark_point_completed'),
path('mark_point_completed_task_page/<int:point_id>/<str:task_id>/', views.mark_point_completed_task_page, name='mark_point_completed_task_page'),
path('getupdatedlaststatus/', views.get_updated_last_status, name='getupdatedlaststatus'),
path('getupdatedactivities/', views.get_latest_activities, name='getupdatedactivities'),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)