Skip to content

Commit ae55ed3

Browse files
committed
Fixes on routes
1 parent cb81867 commit ae55ed3

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

PostModel.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self):
2828

2929
def posts(self, fe=None, tag=None):
3030

31-
3231
if fe:
3332
return self.Post.query.filter_by(PostStatus='1').order_by(self.Post.Id.desc()).all()
3433

controllers/fe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
fe = Blueprint('fe', __name__)
88

99

10-
@fe.route('/<tagname>', methods=['GET'])
10+
@fe.route('/tag/<tagname>', methods=['GET'])
1111
def hometags(tagname=None):
1212

1313
tag = TagModel()

templates/home/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="col-xs-12">
1010
<div style="text-align: center;" class="col-xs-12">
1111
{% for tag in tags%}
12-
<a href="/{{ tag.TagName}}" style="color: #b6b9ba;font-size: {{ format_font(tag.Id) + 9 }}px">{{
12+
<a href="/tag/{{ tag.TagName}}" style="color: #b6b9ba;font-size: {{ format_font(tag.Id) + 9 }}px">{{
1313
tag.TagName}}</a>
1414
{% endfor %}
1515
</div>

templates/home/read.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="col-xs-12">
77
<div style="text-align: center;" class="col-xs-12">
88
{% for tag in tags%}
9-
<a href="/{{ tag.TagName}}" style="color: #b6b9ba;font-size: {{ format_font(tag.Id) + 9 }}px">{{
9+
<a href="/tag/{{ tag.TagName}}" style="color: #b6b9ba;font-size: {{ format_font(tag.Id) + 9 }}px">{{
1010
tag.TagName}}</a>
1111
{% endfor %}
1212
</div>

0 commit comments

Comments
 (0)