Fixed navbar links being broken
parent
21bce0bae4
commit
19e9500a1f
|
@ -4,16 +4,16 @@ from django.urls import reverse
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
navbar_options = {
|
navbar_options = {
|
||||||
"Home": ["Home", reverse("GeoffreyHome")],
|
"Home": ["Home", "GeoffreyHome"],
|
||||||
"Player": ["Players", reverse("GeoffreyPlayers")],
|
"Player": ["Players", "GeoffreyPlayers"],
|
||||||
"Shop": ["Shops", reverse("GeoffreyShops")],
|
"Shop": ["Shops", "GeoffreyShops"],
|
||||||
"Base": ["Bases", reverse("GeoffreyBases")],
|
"Base": ["Bases", "GeoffreyBases"],
|
||||||
"Town": ["Towns", reverse("GeoffreyTowns")],
|
"Town": ["Towns", "GeoffreyTowns"],
|
||||||
"ItemListing": ["Item Listings", reverse("GeoffreyItems")],
|
"ItemListing": ["Item Listings", "GeoffreyItems"],
|
||||||
"PublicFarm": ["Public Farms", reverse("GeoffreyPublicFarms")],
|
"PublicFarm": ["Public Farms", "GeoffreyPublicFarms"],
|
||||||
"Market": ["Markets", reverse("GeoffreyMarkets")],
|
"Market": ["Markets", "GeoffreyMarkets"],
|
||||||
"PointOfInterest": ["Points of Interest", reverse("GeoffreyPointOfInterest")],
|
"PointOfInterest": ["Points of Interest", "GeoffreyPointOfInterest"],
|
||||||
"Attractions": ["Attractions", reverse("GeoffreyAttraction")]
|
"Attractions": ["Attractions", "GeoffreyAttraction"]
|
||||||
}
|
}
|
||||||
|
|
||||||
option_format = '<li class="nav-item{}"> <a class="nav-link" href="{}">{} </a> </li>'
|
option_format = '<li class="nav-item{}"> <a class="nav-link" href="{}">{} </a> </li>'
|
||||||
|
@ -29,6 +29,6 @@ def get_navbar(page):
|
||||||
else:
|
else:
|
||||||
active = ''
|
active = ''
|
||||||
|
|
||||||
navbar += option_format.format(active, navbar_options[option][1], navbar_options[option][0])
|
navbar += option_format.format(active, reverse(navbar_options[option][1]), navbar_options[option][0])
|
||||||
|
|
||||||
return navbar
|
return navbar
|
||||||
|
|
Loading…
Reference in New Issue