Fixed navbar links being broken

doc_update
Joey Hines 2019-09-30 14:38:18 -05:00
parent 21bce0bae4
commit 19e9500a1f
1 changed files with 11 additions and 11 deletions

View File

@ -4,16 +4,16 @@ from django.urls import reverse
register = template.Library()
navbar_options = {
"Home": ["Home", reverse("GeoffreyHome")],
"Player": ["Players", reverse("GeoffreyPlayers")],
"Shop": ["Shops", reverse("GeoffreyShops")],
"Base": ["Bases", reverse("GeoffreyBases")],
"Town": ["Towns", reverse("GeoffreyTowns")],
"ItemListing": ["Item Listings", reverse("GeoffreyItems")],
"PublicFarm": ["Public Farms", reverse("GeoffreyPublicFarms")],
"Market": ["Markets", reverse("GeoffreyMarkets")],
"PointOfInterest": ["Points of Interest", reverse("GeoffreyPointOfInterest")],
"Attractions": ["Attractions", reverse("GeoffreyAttraction")]
"Home": ["Home", "GeoffreyHome"],
"Player": ["Players", "GeoffreyPlayers"],
"Shop": ["Shops", "GeoffreyShops"],
"Base": ["Bases", "GeoffreyBases"],
"Town": ["Towns", "GeoffreyTowns"],
"ItemListing": ["Item Listings", "GeoffreyItems"],
"PublicFarm": ["Public Farms", "GeoffreyPublicFarms"],
"Market": ["Markets", "GeoffreyMarkets"],
"PointOfInterest": ["Points of Interest", "GeoffreyPointOfInterest"],
"Attractions": ["Attractions", "GeoffreyAttraction"]
}
option_format = '<li class="nav-item{}"> <a class="nav-link" href="{}">{} </a> </li>'
@ -29,6 +29,6 @@ def get_navbar(page):
else:
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