38531-vm/core/urls.py
2026-02-17 18:44:08 +00:00

58 lines
2.9 KiB
Python

from django.urls import path, include
from django.contrib.auth import views as auth_views
from .views import (
home, about, signup, onboarding, settings_view,
get_started, inbox, chat_detail,
profile_view, profile_detail, edit_profile,
create_post, delete_post, add_comment, toggle_reaction, hide_post, toggle_follow,
matches, events, groups, my_posts,
send_match_request, handle_match_request, cancel_match_request, block_user, toggle_like,
event_detail, event_create, event_edit, event_delete, event_rsvp
)
urlpatterns = [
path("", home, name="home"),
path("about/", about, name="about"),
path("signup/", signup, name="signup"),
path("onboarding/", onboarding, name="onboarding"),
path("settings/", settings_view, name="settings"),
path("get-started/", get_started, name="get_started"),
path("messages/", inbox, name="inbox"),
path("messages/<str:username>/", chat_detail, name="chat_detail"),
path("profile/", profile_view, name="my_profile"),
path("profile/edit/", edit_profile, name="edit_profile"),
path("profile/<str:username>/", profile_detail, name="profile_detail"),
path("profile/<str:username>/follow/", toggle_follow, name="toggle_follow"),
# Matches
path("matches/", matches, name="matches"),
path("matches/requests/", matches, {'tab': 'requests'}, name="match_requests"),
path("matches/mutual/", matches, {'tab': 'mutual'}, name="match_mutual"),
path("matches/liked/", matches, {'tab': 'liked'}, name="match_liked"),
path("matches/blocked/", matches, {'tab': 'blocked'}, name="match_blocked"),
path("matches/request/<str:username>/", send_match_request, name="send_match_request"),
path("matches/handle/<int:request_id>/", handle_match_request, name="handle_match_request"),
path("matches/cancel/<str:username>/", cancel_match_request, name="cancel_match_request"),
path("matches/block/<str:username>/", block_user, name="block_user"),
path("matches/like/<str:username>/", toggle_like, name="toggle_like"),
path("events/", events, name="events"),
path("events/create/", event_create, name="event_create"),
path("events/<int:event_id>/", event_detail, name="event_detail"),
path("events/<int:event_id>/edit/", event_edit, name="event_edit"),
path("events/<int:event_id>/delete/", event_delete, name="event_delete"),
path("events/<int:event_id>/rsvp/", event_rsvp, name="event_rsvp"),
path("groups/", groups, name="groups"),
path("my-posts/", my_posts, name="my_posts"),
# Social URLs
path("post/create/", create_post, name="create_post"),
path("post/<int:post_id>/delete/", delete_post, name="delete_post"),
path("post/<int:post_id>/comment/", add_comment, name="add_comment"),
path("post/<int:post_id>/react/", toggle_reaction, name="toggle_reaction"),
path("post/<int:post_id>/hide/", hide_post, name="hide_post"),
# Auth URLs
path("accounts/", include("django.contrib.auth.urls")),
]