Browse Source

css + template filtry

master
Jméno Příjmení 4 years ago
parent
commit
628ebe9567
  1. 3
      novinky/static/novinky/css/novinky.css
  2. 2
      novinky/templates/novinky/base.html
  3. 4
      novinky/templates/novinky/index.html

3
novinky/static/novinky/css/novinky.css

@ -0,0 +1,3 @@
body {
}

2
novinky/templates/novinky/base.html

@ -1,3 +1,4 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
@ -5,6 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Novinky</title>
<link rel="stylesheet" href="{% static 'novinky/css/novinky.css' %}">
</head>
<body>
{% block content %}

4
novinky/templates/novinky/index.html

@ -4,11 +4,11 @@
<h1>Novinky</h1>
{% for novinka in novinky %}
{{ novinka.datum }} <br>
{{ novinka.datum|date:"j. E Y G:i" }} <br>
{{ novinka.autor }}
<h2>{{ novinka.titulek }}</h2>
<p>
{{ novinka.zprava }}
{{ novinka.zprava|truncatewords:10 }}
</p>
{% endfor %}

Loading…
Cancel
Save