Fix prospector errors and move secret_key to yaml config

This commit is contained in:
Jens Langhammer
2018-11-27 10:56:40 +01:00
parent 7c7b3469e9
commit cde35515c7
7 changed files with 10 additions and 11 deletions

View File

@ -29,6 +29,7 @@ secure_proxy_header:
redis: localhost
# Error reporting, sends stacktrace to sentry.services.beryju.org
error_report_enabled: true
secret_key: 9$@r!d^1^jrn#fk#1#@ks#9&i$^s#1)_13%$rwjrhd=e8jfi_s
passbook:
sign_up:

View File

View File

@ -2,10 +2,6 @@
from logging import getLogger
from django import template
from django.apps import AppConfig
from django.core.cache import cache
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
register = template.Library()
LOGGER = getLogger(__name__)

View File

@ -145,10 +145,10 @@ def related_models(context, model_path):
user = request.user
model = path_to_class(model_path)
if not issubclass(model, UserAcquirable):
# model_path is not actually a module
# so we can't assume that it's usable
return []
# if not issubclass(model, UserAcquirable):
# # model_path is not actually a module
# # so we can't assume that it's usable
# return []
return model.objects.filter(users__in=[user])
@ -161,4 +161,5 @@ def unslug(_input):
@register.filter(name='css_class')
def css_class(field, css):
return field.as_widget(attrs={"class": css})
"""Add css class to form field"""
return field.as_widget(attrs={"class": css})