mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Merge branch 'sas_right_fix' into 'master'
Sas right fix See merge request !50
This commit is contained in:
commit
fa1a4599b6
@ -444,6 +444,7 @@ class AnonymousUser(AuthAnonymousUser):
|
||||
def __init__(self, request):
|
||||
super(AnonymousUser, self).__init__()
|
||||
|
||||
@property
|
||||
def was_subscribed(self):
|
||||
return False
|
||||
|
||||
|
@ -492,3 +492,17 @@ except:
|
||||
if DEBUG:
|
||||
INSTALLED_APPS += ("debug_toolbar",)
|
||||
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
|
||||
DEBUG_TOOLBAR_PANELS = [
|
||||
'debug_toolbar.panels.versions.VersionsPanel',
|
||||
'debug_toolbar.panels.timer.TimerPanel',
|
||||
'debug_toolbar.panels.settings.SettingsPanel',
|
||||
'debug_toolbar.panels.headers.HeadersPanel',
|
||||
'debug_toolbar.panels.request.RequestPanel',
|
||||
'debug_toolbar.panels.sql.SQLPanel',
|
||||
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
|
||||
'sith.toolbar_debug.TemplatesPanel',
|
||||
'debug_toolbar.panels.cache.CachePanel',
|
||||
'debug_toolbar.panels.signals.SignalsPanel',
|
||||
'debug_toolbar.panels.logging.LoggingPanel',
|
||||
'debug_toolbar.panels.redirects.RedirectsPanel',
|
||||
]
|
||||
|
8
sith/toolbar_debug.py
Normal file
8
sith/toolbar_debug.py
Normal file
@ -0,0 +1,8 @@
|
||||
from debug_toolbar.panels.templates import TemplatesPanel as BaseTemplatesPanel
|
||||
|
||||
class TemplatesPanel(BaseTemplatesPanel):
|
||||
def generate_stats(self, *args):
|
||||
template = self.templates[0]['template']
|
||||
if not hasattr(template, 'engine') and hasattr(template, 'backend'):
|
||||
template.engine = template.backend
|
||||
return super().generate_stats(*args)
|
Loading…
Reference in New Issue
Block a user