Skip to content

Commit

Permalink
Update project URLs to use 'project_view' and adjust related templates
Browse files Browse the repository at this point in the history
  • Loading branch information
JisanAR03 committed Jan 1, 2025
1 parent 6a50824 commit 95719fb
Show file tree
Hide file tree
Showing 6 changed files with 429 additions and 245 deletions.
8 changes: 2 additions & 6 deletions blt/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@
)
from website.views.project import (
ProjectBadgeView,
ProjectDetailView,
ProjectListView,
ProjectsDetailView,
ProjectView,
RepoDetailView,
Expand Down Expand Up @@ -539,8 +537,7 @@
TemplateView.as_view(template_name="coming_soon.html"),
name="googleplayapp",
),
re_path(r"^projects/$", ProjectListView.as_view(), name="project_list"),
re_path(r"^allprojects/$", ProjectView.as_view(), name="project_view"),
re_path(r"^projects/$", ProjectView.as_view(), name="project_view"),
re_path(r"^apps/$", TemplateView.as_view(template_name="apps.html"), name="apps"),
re_path(
r"^deletions/$",
Expand Down Expand Up @@ -590,7 +587,6 @@
re_path(r"^api/v1/createwallet/$", create_wallet, name="create_wallet"),
re_path(r"^api/v1/count/$", issue_count, name="api_count"),
re_path(r"^api/v1/contributors/$", contributors, name="api_contributor"),
path("project/<slug:slug>/", ProjectDetailView.as_view(), name="project_view"),
path("projects/<slug:slug>/badge/", ProjectBadgeView.as_view(), name="project-badge"),
path("repository/<slug:slug>/", RepoDetailView.as_view(), name="repo_detail"),
re_path(r"^report-ip/$", ReportIpView.as_view(), name="report_ip"),
Expand Down Expand Up @@ -802,7 +798,7 @@
name="similarity_scan",
),
path("projects/create/", create_project, name="create_project"),
path("projects/<slug:slug>/", ProjectsDetailView.as_view(), name="projects_detail"),
path("project/<slug:slug>/", ProjectsDetailView.as_view(), name="projects_detail"),
]

if settings.DEBUG:
Expand Down
2 changes: 1 addition & 1 deletion website/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h2 class="text-3xl font-bold mb-6">Get Involved</h2>
class="bg-green-500 text-white font-semibold py-3 px-6 rounded-full">
<i class="fas fa-users"></i> Join the Community
</a>
<a href="{% url 'project_list' %}"
<a href="{% url 'project_view' %}"
class="bg-blue-500 text-white font-semibold py-3 px-6 rounded-full">
<i class="fas fa-project-diagram"></i> Explore Projects
</a>
Expand Down
2 changes: 1 addition & 1 deletion website/templates/includes/sidenav.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<div class="my-4 border-t border-gray-300"></div>
<!-- Projects Header Link -->
<li class="mb-2 {% if request.path == '/projects/' %}bg-gray-200{% endif %}">
<a href="{% url 'project_list' %}"
<a href="{% url 'project_view' %}"
class="flex items-center w-full no-underline p-2 {% if '/projects/' in request.path %} text-black {% else %} hover:text-red-500 text-black {% endif %}">
<div class="icon text-orange-500">
<i class="fas fa-box fa-lg"></i>
Expand Down
Loading

0 comments on commit 95719fb

Please sign in to comment.