mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
tiny docstring, import and trailing slash change
This commit is contained in:
parent
a82a83576f
commit
50f657fbc5
2
menu.py
2
menu.py
@ -69,7 +69,7 @@ class Menu(object):
|
|||||||
return request_path.startswith(self.url)
|
return request_path.startswith(self.url)
|
||||||
|
|
||||||
def active_item(self, request):
|
def active_item(self, request):
|
||||||
"""Return the first active item that is found"""
|
"""Return the first active item (e.g. submenu) that is found"""
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
if request.path.startswith(item.url):
|
if request.path.startswith(item.url):
|
||||||
return item
|
return item
|
||||||
|
|||||||
@ -8,9 +8,9 @@ import cfg
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
"""Initialize the Help module"""
|
"""Initialize the Help module"""
|
||||||
menu = cfg.main_menu.add_item(_('Documentation'), 'icon-book', '/help',
|
menu = cfg.main_menu.add_item(_('Documentation'), 'icon-book',
|
||||||
101)
|
'/help/index', 101)
|
||||||
menu.add_item(_("Where to Get Help"), "icon-search", "/help/index/", 5)
|
menu.add_item(_("Where to Get Help"), "icon-search", "/help/index", 5)
|
||||||
menu.add_item(_('Developer\'s Manual'), 'icon-info-sign',
|
menu.add_item(_('Developer\'s Manual'), 'icon-info-sign',
|
||||||
'/help/page/plinth', 10)
|
'/help/page/plinth', 10)
|
||||||
menu.add_item(_('FAQ'), 'icon-question-sign', '/help/page/faq', 20)
|
menu.add_item(_('FAQ'), 'icon-question-sign', '/help/page/faq', 20)
|
||||||
|
|||||||
6
views.py
6
views.py
@ -19,12 +19,12 @@
|
|||||||
Main Plinth views
|
Main Plinth views
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
from django.http.response import HttpResponseRedirect
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import cfg
|
|
||||||
from withsqlite.withsqlite import sqlite_db
|
from withsqlite.withsqlite import sqlite_db
|
||||||
from django.http.response import HttpResponseRedirect
|
import cfg
|
||||||
from django.core.urlresolvers import reverse
|
|
||||||
|
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user