diff --git a/ram/portal/admin.py b/ram/portal/admin.py index 2ab5869..cc637bb 100644 --- a/ram/portal/admin.py +++ b/ram/portal/admin.py @@ -3,6 +3,7 @@ from portal.models import SiteConfiguration, Flatpage + @admin.register(SiteConfiguration) class SiteConfigurationAdmin(SingletonModelAdmin): fieldsets = ( diff --git a/ram/portal/context_processors.py b/ram/portal/context_processors.py new file mode 100644 index 0000000..77bf723 --- /dev/null +++ b/ram/portal/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def default_card_image(request): + return {"DEFAULT_CARD_IMAGE": settings.DEFAULT_CARD_IMAGE} diff --git a/ram/portal/static/coming_soon.png b/ram/portal/static/coming_soon.png new file mode 100644 index 0000000..a68fc7a Binary files /dev/null and b/ram/portal/static/coming_soon.png differ diff --git a/ram/portal/templates/cards.html b/ram/portal/templates/cards.html index 00fd87c..901de83 100644 --- a/ram/portal/templates/cards.html +++ b/ram/portal/templates/cards.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static %} {% block header %}
Results found: {{ matches }}
@@ -9,9 +10,11 @@ {% for d in data %}{{ d }} diff --git a/ram/ram/__init__.py b/ram/ram/__init__.py index a1f30fc..d83f9cb 100644 --- a/ram/ram/__init__.py +++ b/ram/ram/__init__.py @@ -1,4 +1,4 @@ from ram.utils import git_suffix -__version__ = "0.4.2" +__version__ = "0.4.3" __version__ += git_suffix(__file__) diff --git a/ram/ram/settings.py b/ram/ram/settings.py index 6c65b5c..7e44648 100644 --- a/ram/ram/settings.py +++ b/ram/ram/settings.py @@ -80,6 +80,7 @@ "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", + "portal.context_processors.default_card_image", ], }, }, @@ -148,6 +149,10 @@ "ZZ": "Freelance", } +# Image used on cards without a custom image uploaded. +# The file must be placed in the root of the 'static' folder +DEFAULT_CARD_IMAGE = "coming_soon.png" + DECODER_INTERFACES = [ (1, "NEM651"), (2, "NEM652"),