parent
9d1261d05a
commit
5cf375ae24
5 changed files with 15 additions and 2 deletions
@ -1,5 +1,10 @@ |
|||||||
from apps.config.models import Config |
from apps.config.models import Config |
||||||
|
from apps.content.models import Baner |
||||||
|
|
||||||
|
|
||||||
def config(request): |
def config(request): |
||||||
return {"config": Config.load()} |
return {"config": Config.load()} |
||||||
|
|
||||||
|
|
||||||
|
def baner(request): |
||||||
|
return {'baner': Baner.objects.filter(use=True).first()} |
||||||
|
|||||||
@ -0,0 +1,6 @@ |
|||||||
|
{% if baner %} |
||||||
|
<div class="baner" style="background-image: url({{ baner.image.url }});"> |
||||||
|
<span class="baner__text">{{ baner.text }}</span> |
||||||
|
<a href="{{ baner.url }}" class="baner__link">{{ baner.button_text }}</a> |
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
Loading…
Reference in new issue