heroku
This commit is contained in:
parent
721f258297
commit
54bc697308
@ -1,5 +1,5 @@
|
||||
{% load staticfiles %}
|
||||
{% load pagination_filters %}
|
||||
{% comment %} {% load pagination_filters %} {% comment %}
|
||||
<html>
|
||||
<head>
|
||||
<title>BLOG</title>
|
||||
@ -64,7 +64,7 @@
|
||||
{% if posts.has_other_pages %}
|
||||
<a href="?page=1{% if search_query != '' %}&search={{ search_query }} {% endif %}">←</a>
|
||||
{% for page in posts.paginator.num_pages|truncate:posts.number %}
|
||||
{% if page == posts.number %} {{page}}
|
||||
{% if page == posts.number %} {{page}}
|
||||
{% else %} <a href="?page={{page}}{% if search_query != '' %}&search={{ search_query }} {% endif %}">{{page}}</a> {% endif %} {% endfor %}
|
||||
<a href="?page={{ posts.paginator.num_pages }}{% if search_query != '' %}&search={{ search_query }} {% endif %}"> → </a>
|
||||
{% endif %}
|
||||
@ -73,7 +73,7 @@
|
||||
{% if posts.has_previous %}
|
||||
<li> <a href="?page=1"><<</a> </li>
|
||||
<li> <a href="?page={{ posts.previous_page_number }}">{{ posts.previous_page_number }}</a> </li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if posts.has_other_pages %}<li> <a style="color: #000000" href="">{{ posts.number }}</a></li> {% endif %}
|
||||
{% if posts.has_next %}
|
||||
<li> <a href="?page={{ posts.next_page_number }}"> {{ posts.next_page_number }}</a> </li>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'blog/base.html' %}
|
||||
{% load pagination_tags %}
|
||||
{% comment %} {% load pagination_tags %} {% endcomment %}
|
||||
|
||||
{% block content %}
|
||||
{% if posts %}
|
||||
@ -8,7 +8,7 @@
|
||||
<div class="post-header">
|
||||
<h2><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h2>
|
||||
<div class="date"><i class="fa fa-calendar"></i> {{ post.published_date}}</div>
|
||||
{% if post.tags.names %}
|
||||
{% if post.tags.names %}
|
||||
<div class="tag">
|
||||
<i class="fa fa-tags"></i>
|
||||
{% for tag in post.tags.names %}
|
||||
@ -17,10 +17,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
|
||||
</div>
|
||||
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% else %}
|
||||
<div class="post">
|
||||
<p>Ничего не найдено</p>
|
||||
|
@ -41,7 +41,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'blog',
|
||||
'taggit',
|
||||
'pagination',
|
||||
# 'pagination',
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
Django==1.11
|
||||
Django==1.11.1
|
||||
django-taggit==0.22.1
|
||||
psycopg2
|
||||
django-tinymce
|
||||
|
Loading…
Reference in New Issue
Block a user