Merge pull request #83 from liangliangyy/dev

侧边栏评论增加锚链接
sh_branch
车亮亮 8 years ago committed by GitHub
commit aa99c52183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -272,7 +272,7 @@ def refresh_memcache(request):
def page_not_found_view(request, exception, template_name='blog/error_page.html'):
if exception:
logger.error(exception)
logger.warn(exception)
url = request.get_full_path()
return render(request, template_name,
{'message': '哎呀,您访问的地址 ' + url + ' 是一个未知的地方。请点击首页看看别的?', 'statuscode': '404'}, status=404)
@ -280,11 +280,11 @@ def page_not_found_view(request, exception, template_name='blog/error_page.html'
def server_error_view(request, template_name='blog/error_page.html'):
return render(request, template_name,
{'message': '哎呀,出错了,我已经收集到了错误信息,之后会抓紧抢修,请点击首页看看别的?', 'statuscode': '500'})
{'message': '哎呀,出错了,我已经收集到了错误信息,之后会抓紧抢修,请点击首页看看别的?', 'statuscode': '500'}, status=500)
def permission_denied_view(request, exception, template_name='blog/error_page.html'):
if exception:
logger.error(exception)
logger.warn(exception)
return render(request, template_name,
{'message': '哎呀,您没有权限访问此页面,请点击首页看看别的?', 'statuscode': '403'})
{'message': '哎呀,您没有权限访问此页面,请点击首页看看别的?', 'statuscode': '403'}, status=403)

@ -54,7 +54,7 @@
<span class="comment-author-link">
{{ c.author.username }}</span>
发表在
<a href="{{ c.article.get_absolute_url }}">{{ c.article.title }}</a>
<a href="{{ c.article.get_absolute_url }}#comment-{{ c.pk }}">{{ c.article.title }}</a>
</li>
{% endfor %}
</ul>

Loading…
Cancel
Save