File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11from django .conf import settings
22
3- DYNAMIC_BREADCRUMBS_HOME_LABEL = getattr (
3+ HOME_LABEL = getattr (
44 settings , "DYNAMIC_BREADCRUMBS_HOME_LABEL" , "Home"
55)
6- DYNAMIC_BREADCRUMBS_SHOW_AT_BASE_PATH = getattr (
6+ SHOW_AT_BASE_PATH = getattr (
77 settings , "DYNAMIC_BREADCRUMBS_SHOW_AT_BASE_PATH" , False
88)
9- DYNAMIC_BREADCRUMBS_SHOW_VERBOSE_NAME = getattr (
9+ SHOW_VERBOSE_NAME = getattr (
1010 settings , "DYNAMIC_BREADCRUMBS_SHOW_VERBOSE_NAME" , True
1111)
12+
13+ PATH_ALPHANUMERIC = getattr (
14+ settings , "DYNAMIC_BREADCRUMBS_PATH_ONLY_ALPHANUMERIC" , True
15+ )
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def _split_path(self, path=None):
8686 def _add_home (self ):
8787 b_item = BreadcrumbsItem (
8888 base_url = self .base_url ,
89- name_raw = app_settings .DYNAMIC_BREADCRUMBS_HOME_LABEL ,
89+ name_raw = app_settings .HOME_LABEL ,
9090 path = "/" ,
9191 position = 1 ,
9292 )
@@ -99,7 +99,7 @@ def _fill_items(self):
9999 # add home
100100 # if have to show home item, and location is home, shows it
101101 # or if location is not home, always shows home in breadcrumbs
102- if (app_settings .DYNAMIC_BREADCRUMBS_SHOW_AT_BASE_PATH and not parts ) or parts :
102+ if (app_settings .SHOW_AT_BASE_PATH and not parts ) or parts :
103103 self ._add_home ()
104104
105105 if parts == []:
@@ -135,7 +135,7 @@ def get_url(self):
135135 return result
136136
137137 def get_name (self ):
138- if self .position == 2 and app_settings .DYNAMIC_BREADCRUMBS_SHOW_VERBOSE_NAME :
138+ if self .position == 2 and app_settings .SHOW_VERBOSE_NAME :
139139 try :
140140 return apps .get_app_config (self .name_raw ).verbose_name
141141 except Exception :
You can’t perform that action at this time.
0 commit comments