diff --git a/sdbs_pile/pile/templates/front_intro.html b/sdbs_pile/pile/templates/front_intro.html index 108c6a5..dc6f928 100644 --- a/sdbs_pile/pile/templates/front_intro.html +++ b/sdbs_pile/pile/templates/front_intro.html @@ -10,23 +10,25 @@ postupně dávat ty nejdůležitější nebo nejzajímavější věci, zatim se o tom ale nikde moc nešiřte.

/-\

-
-

Random document

-
- - #{{ random_document.id }}: {{ random_document.title }} + {% if random_document %} +
+

Random document

+
+ + #{{ random_document.id }}: {{ random_document.title }} -
- {% if random_document.tags.count > 0 %} -
Filed under: {{ random_document.tags.all | join:" / " }}
- {% endif %} -
-
- {{ random_document.html_description | safe }} -
-
+
+ {% if random_document.tags.count > 0 %} +
Filed under: {{ random_document.tags.all | join:" / " }}
+ {% endif %} +
+
+ {{ random_document.html_description | safe }} +
+ +
-
+ {% endif %}

Recent additions

diff --git a/sdbs_pile/pile/views.py b/sdbs_pile/pile/views.py index 7f4fee6..4200dc6 100644 --- a/sdbs_pile/pile/views.py +++ b/sdbs_pile/pile/views.py @@ -51,7 +51,7 @@ class IndexView(BasePileView): return { 'recent_documents': self.documents.order_by('-uploaded')[:5], - 'random_document': choice(self.documents.all()[5:]), + 'random_document': choice(self.documents.all()[5:]) if self.documents.count() > 0 else None, **base_context_data }