|
@@ -112,7 +112,7 @@ def avatar(request, pk):
|
|
|
def index(request):
|
|
|
article_sql = '''SELECT count(*) as count,strftime('%Y-%m',created_time) as datetime FROM blog_article group by strftime('%Y,%m',created_time)'''
|
|
|
tag_sql = '''SELECT bt.id,bt.name,count() as count FROM blog_tags bt left join blog_article_tags bat on bt.id = bat.tags_id group by bt.name
|
|
|
-order by count desc limit 10'''
|
|
|
+order by count desc limit 20'''
|
|
|
cursor = connection.cursor()
|
|
|
cursor.execute(article_sql)
|
|
|
fetchall = cursor.fetchall()
|