Skip to content

Commit 7b073d0

Browse files
authored
Merge pull request #519 from liangliangyy/dev
fix bugs
2 parents 38173bf + 3fe9789 commit 7b073d0

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

DjangoBlog/elasticsearch_backend.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ def __init__(self, connection_alias, **connection_options):
3535
connection_alias,
3636
**connection_options)
3737
self.manager = ArticleDocumentManager()
38-
# try:
39-
# self._rebuild(None)
40-
# except:
41-
# pass
4238

4339
def _get_models(self, iterable):
4440
models = iterable if iterable and iterable[0] else Article.objects.all()
@@ -96,9 +92,6 @@ def search(self, query_string, **kwargs):
9692
model_name = 'Article'
9793
additional_fields = {}
9894

99-
# if 'highlight' in raw_result:
100-
# additional_fields['highlighted'] = raw_result['highlight'].get(content_field, '')
101-
10295
result_class = SearchResult
10396

10497
result = result_class(

templates/blog/tags/article_info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1 class="entry-title">
2323
<a href="{{ article.get_absolute_url }}#comments" class="ds-thread-count" data-thread-key="3815"
2424
rel="nofollow">
2525
<span class="leave-reply">
26-
{% if article.comment and article.comment_set.count %}
26+
{% if article.comment_set and article.comment_set.count %}
2727
{{ article.comment_set.count }}个评论
2828
{% else %}
2929
发表评论

templates/blog/tags/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
</li>
123123

124124
{% else %}
125-
<li><a href="{% url "account:login" %}" rel="nofollow">登录</a>
125+
<li><a href="{% url "account:login" %}" rel="nofollow">登录</a></li>
126126
{% endif %}
127127
{% if user.is_superuser %}
128128
<li><a href="{% url "blog:refresh" %}" target="_blank">刷新缓存</a></li>

0 commit comments

Comments
 (0)