From 67ddb224bf259fdd9e88aa36197d5034f826224f Mon Sep 17 00:00:00 2001 From: liangliangyy Date: Wed, 23 Oct 2019 16:38:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA=E6=8E=92=E5=BA=8F=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog/urls.py | 2 +- comments/models.py | 4 ++-- requirements.txt | 36 ++++++++++++++++++------------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blog/urls.py b/blog/urls.py index c84f696..df2e6a8 100644 --- a/blog/urls.py +++ b/blog/urls.py @@ -39,7 +39,7 @@ urlpatterns = [ path(r'tag/.html', views.TagDetailView.as_view(), name='tag_detail'), path(r'tag//.html', views.TagDetailView.as_view(), name='tag_detail_page'), - path('archives.html', views.ArchivesView.as_view(), name='archives'), + path('archives.html', cache_page(60 * 60)(views.ArchivesView.as_view()), name='archives'), path('links.html', views.LinkListView.as_view(), name='links'), path(r'upload', views.fileupload, name='upload'), path(r'refresh', views.refresh_memcache, name='refresh') diff --git a/comments/models.py b/comments/models.py index 356bb92..e825322 100644 --- a/comments/models.py +++ b/comments/models.py @@ -16,10 +16,10 @@ class Comment(models.Model): is_enable = models.BooleanField('是否显示', default=True, blank=False, null=False) class Meta: - ordering = ['-id'] + ordering = ['id'] verbose_name = "评论" verbose_name_plural = verbose_name - get_latest_by = 'created_time' + get_latest_by = 'id' def __str__(self): return self.body diff --git a/requirements.txt b/requirements.txt index 06e89de..a4641b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ appdirs==1.4.3 -asn1crypto==0.24.0 -astroid==2.2.5 +asn1crypto==1.2.0 +astroid==2.3.2 attrs==19.1.0 bottle==0.12.17 -certifi==2019.6.16 -cffi==1.12.3 +certifi==2019.9.11 +cffi==1.13.1 chardet==3.0.4 coverage==4.5.4 -cryptography==2.7 -Django==2.2.4 +cryptography==2.8 +Django==2.2.6 django-appconf==1.0.3 django-autoslug==1.9.6 django-compressor==2.3 @@ -16,7 +16,7 @@ django-debug-toolbar==2.0 django-haystack==2.8.1 django-ipware==2.1.0 django-mdeditor==0.1.16 -django-uuslug==1.1.8 +django-uuslug==1.1.9 elasticsearch==7.0.0 elasticsearch-dsl==7.0.0 idna==2.8 @@ -24,35 +24,35 @@ ipaddress==1.0.22 isort==4.3.21 jieba==0.39 jsonpickle==1.2 -lazy-object-proxy==1.4.1 +lazy-object-proxy==1.4.2 markdown2==2.3.8 mccabe==0.6.1 mistune==0.8.4 -mysqlclient==1.4.2.post1 +mysqlclient==1.4.4 olefile==0.46 -packaging==19.1 -Pillow==6.1.0 +packaging==19.2 +Pillow==6.2.1 pycparser==2.19 Pygments==2.4.2 -pylint==2.3.1 +pylint==2.4.3 pyparsing==2.4.2 python-dateutil==2.8.0 python-logstash==0.4.6 python-memcached==1.59 -python-slugify==3.0.3 -pytz==2019.2 +python-slugify==4.0.0 +pytz==2019.3 raven==6.10.0 rcssmin==1.0.6 requests==2.22.0 rjsmin==1.1.0 six==1.12.0 sqlparse==0.3.0 -text-unidecode==1.2 -typed-ast==1.3.1 +text-unidecode==1.3 +typed-ast==1.4.0 Unidecode==1.1.1 -urllib3==1.25.3 +urllib3==1.25.6 webencodings==0.5.1 -WeRoBot==1.9.0 +WeRoBot==1.10.1 Whoosh==2.7.4 wrapt==1.11.2 xmltodict==0.12.0