From 1b0fe4588e99e943c8dd222ac513d34aa2c3aaf2 Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Sun, 3 Nov 2024 19:06:21 +0000 Subject: [PATCH] Fixed many things, like the home page not working --- rides/__pycache__/urls.cpython-312.pyc | Bin 855 -> 967 bytes rides/urls.py | 1 + templates/home.html | 2 +- templates/parks/park_detail.html | 97 +++++++++--------- templates/parks/partials/location_widget.html | 2 +- templates/rides/ride_detail.html | 2 +- 6 files changed, 55 insertions(+), 49 deletions(-) diff --git a/rides/__pycache__/urls.cpython-312.pyc b/rides/__pycache__/urls.cpython-312.pyc index ee835034a038596f2466cbbfaede3a836a06a95c..967d0df51a4d17c2d6628ab2afca180bacac497f 100644 GIT binary patch delta 231 zcmcc4cAQ=PG%qg~0}$*!q@MnRk%8echyw$hP{!wqiRyV10}Un~6=CF?EXSxnnUhh3 zQ2@xYVq;=RWlZ6lEX8On%)f?xH8Vs@I%^bHrGTd3Me#_oFIYtoXp~q$e`=X%sWkKBy-d9*0ZnAJpe!!H&&CSNo)W}^V H4%80-bVfON delta 148 zcmX@kew|JIG%qg~0}vdztCl{Kk%8echyw#0P{wDIiRyWbe3RuE^(P(`nJmj_FqxB4 zWO5>q_GRSeNN0)Ss^rt;pS*-oN%R)OEzY9Ml+^f~%;FMF##=0TiMgqh-!SGgvQLg- i+Rh~bG!tkKLvj0LS!T(}fy~+5oUHszjod|IKv4k19wGez diff --git a/rides/urls.py b/rides/urls.py index 7133ec52..77db4f29 100644 --- a/rides/urls.py +++ b/rides/urls.py @@ -4,6 +4,7 @@ from . import views app_name = 'rides' # Add namespace urlpatterns = [ + path('all/', views.RideListView.as_view(), name='all_rides'), # New pattern for all rides path('', views.RideListView.as_view(), name='ride_list'), path('create/', views.RideCreateView.as_view(), name='ride_create'), path('/edit/', views.RideUpdateView.as_view(), name='ride_edit'), diff --git a/templates/home.html b/templates/home.html index 30a8f36a..dbe3980f 100644 --- a/templates/home.html +++ b/templates/home.html @@ -18,7 +18,7 @@ class="px-8 py-3 text-lg btn-primary"> Explore Parks - View Rides diff --git a/templates/parks/park_detail.html b/templates/parks/park_detail.html index 2799612e..d78f0673 100644 --- a/templates/parks/park_detail.html +++ b/templates/parks/park_detail.html @@ -9,17 +9,33 @@
-

{{ park.name }}

- {% if park.city or park.state or park.country %} -

- - {% if park.city %}{{ park.city }}{% endif %} - {% if park.city and park.state %}, {% endif %} - {% if park.state %}{{ park.state }}{% endif %} - {% if park.country and park.state or park.city %}, {% endif %} - {% if park.country %}{{ park.country }}{% endif %} -

- {% endif %} +
+
+

{{ park.name }}

+ {% if park.city or park.state or park.country %} +

+ + {% if park.city %}{{ park.city }}{% endif %} + {% if park.city and park.state %}, {% endif %} + {% if park.state %}{{ park.state }}{% endif %} + {% if park.country and park.state or park.city %}, {% endif %} + {% if park.country %}{{ park.country }}{% endif %} +

+ {% endif %} +
+ {% if user.is_authenticated %} +
+ + Edit + + {% if perms.media.add_photo %} + + {% endif %} +
+ {% endif %} +
- {{ park.total_rides }} Rides - - {% endif %} - {% if park.total_roller_coasters %} - - {{ park.total_roller_coasters }} Roller Coasters - - {% endif %}
@@ -79,21 +85,32 @@
{{ park.size_acres }} acres
{% endif %} + {% if park.total_rides %} +
+
Total Rides
+
{{ park.total_rides }}
+
+ {% endif %} + {% if park.total_roller_coasters %} +
+
Roller Coasters
+
{{ park.total_roller_coasters }}
+
+ {% endif %} + {% if park.website %} +
+
Website
+
+ + Official Website + +
+
+ {% endif %}
- - {% if user.is_authenticated %} -
- - Edit - - {% if perms.media.add_photo %} - - {% endif %} -
- {% endif %} @@ -161,18 +178,6 @@ {% endif %} - {% if park.website %} - - {% endif %} -

History

diff --git a/templates/parks/partials/location_widget.html b/templates/parks/partials/location_widget.html index aaa77b72..d9b432ef 100644 --- a/templates/parks/partials/location_widget.html +++ b/templates/parks/partials/location_widget.html @@ -38,7 +38,7 @@
{# Map Container #} -
+
diff --git a/templates/rides/ride_detail.html b/templates/rides/ride_detail.html index ba2599d5..3b5ded95 100644 --- a/templates/rides/ride_detail.html +++ b/templates/rides/ride_detail.html @@ -40,7 +40,7 @@ {% if user.is_authenticated %}
- Edit + Edit {% if perms.media.add_photo %}