Commits

Matthew Schinckel committed 4c9c11c

Better handling of menu items that start with url:

Comments (0)

Files changed (1)

menus/templatetags/menu_item.py

         """
         if self.url[0] in "\"'":
             url = self.url.strip("'\"")
-            if url.startswith('url:'):
-                url = reverse(url[4:])
         else:
-            url = resolve_path(self.url, context)
+            url = self.url
+            
+        if url.startswith('url:'):
+            url = reverse(url[4:])
+        else:
+            url = resolve_path(url, context)
         
         if self.text[0] in "\"'":
             text = self.text.strip("\"'")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.