diff --git a/.gitignore b/.gitignore index 830e975..db5c4d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ # Binbin binblog/whoosh_index/* -log/* +#log/* collectedstatic/* media/photo/* media/editor/* binblog/settings.py -binblog/binblog-bak.sql +binblog/binblog.sql post/ # Byte-compiled / optimized / DLL files diff --git a/.travis.yml b/.travis.yml index a040b6c..4887757 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,24 +13,24 @@ branches: # - DJANGO_SETTINGS_MODULE="binblog.settings_travis" # 设置Django配置文件 before_install: - # mysql -h127.0.0.1 -P3306 -uroot -p -e"create database blog default character set utf8 collate utf8_general_ci;" - - mysql -e "create database blog default character set utf8 collate utf8_general_ci;" - cp binblog/settings_travis.py binblog/settings.py # 复制一份配置文件, 用于app引入相关设置 # https://codecov.io && https://coveralls.io install: # 安装依赖 - pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple - - pip install python-coveralls - - pip install coverage codecov + - pip install python-coveralls -i https://mirrors.aliyun.com/pypi/simple + - pip install coverage codecov -i https://mirrors.aliyun.com/pypi/simple before_script: # 执行相关脚本 + # mysql -h127.0.0.1 -P3306 -uroot -p -e"create database blog default character set utf8 collate utf8_general_ci;" + - mysql -e "create database blog default character set utf8 collate utf8_general_ci;" - python manage.py makemigrations - python manage.py migrate - - python manage.py create_fake_data - python manage.py collectstatic --noinput - python manage.py compress --force + - python manage.py create_fake_data script: - coverage run manage.py test # 进行测试 diff --git a/binblog/settings_example.py b/binblog/settings_example.py index 3106dfd..ed269ff 100644 --- a/binblog/settings_example.py +++ b/binblog/settings_example.py @@ -1,6 +1,10 @@ """ This is a example settings.py file +You need to copy and rename this file to settings.py +Also need to update something. Like SECRET_KEY/DEBUG/DATABASES/EMAIL/CACHE if you need +这是个配置文件的例子, 使用需要复制拷贝一份并重命名为settings.py文件 +同样, 根据需要修改自己的秘钥/DB/邮箱/缓存的设置 """ import os @@ -12,7 +16,7 @@ # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'i89n!-gv=7!snicdlre^3v=i0zw3cgbs31@)&wv5gk_g$x1xx3' +SECRET_KEY = 'xxw#*r=6c8f70g_k4*0kxjhw&9a0ivy*(fsu7#!6-3=qt22w-%s' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True diff --git a/binblog/settings_travis.py b/binblog/settings_travis.py index 9651448..fd02061 100644 --- a/binblog/settings_travis.py +++ b/binblog/settings_travis.py @@ -1,4 +1,4 @@ -from binblog.settings import * +from binblog.settings_example import * # 覆盖原先settings里的一些配置 # https://docs.travis-ci.com/user/database-setup/ diff --git a/log/binblog_error.log b/log/binblog_error.log index e69de29..4f307f9 100644 --- a/log/binblog_error.log +++ b/log/binblog_error.log @@ -0,0 +1 @@ +[2019-11-02 23:38:01,658] ERROR [blog.views.page_not_found:297 views] {'status': '404', 'path': '彬彬冲呀66666666'} diff --git a/requirements.txt b/requirements.txt index 6336f36..e14e53e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,38 +1,36 @@ -amqp==2.4.2 -billiard==3.6.0.0 +amqp==2.5.1 +billiard==3.6.1.0 celery==4.3.0 -certifi==2019.3.9 +certifi==2019.9.11 chardet==3.0.4 -Django==2.2.6 +Django==2.1 django-appconf==1.0.3 -django-compressor==2.2 +django-compressor==2.3 django-haystack==2.8.1 -django-mdeditor==0.1.13 -django-pagedown==1.0.6 -djangorestframework==3.9.2 +django-mdeditor==0.1.16 +django-pagedown==2.0.3 +djangorestframework==3.10.3 djangorestframework-jwt==1.11.0 -dnspython==1.16.0 -docutils==0.14 -eventlet==0.25.0 -greenlet==0.4.15 +docutils==0.15.2 idna==2.8 +importlib-metadata==0.23 jieba==0.39 -kombu==4.5.0 +kombu==4.6.5 mistune==0.8.4 -monotonic==1.5 -mysqlclient==1.4.1 -Pillow==5.4.1 -Pygments==2.3.1 +more-itertools==7.2.0 +mysqlclient==1.4.4 +Pillow==6.2.1 +Pygments==2.4.2 PyJWT==1.7.1 -python-memcached==1.59 -pytz==2019.1 +pytz==2019.3 rcssmin==1.0.6 -redis==3.2.1 -requests==2.21.0 -rjsmin==1.0.12 +redis==3.3.11 +requests==2.22.0 +rjsmin==1.1.0 six==1.12.0 sqlparse==0.3.0 -Unidecode==1.0.23 -urllib3==1.24.3 +Unidecode==1.1.1 +urllib3==1.25.6 vine==1.3.0 Whoosh==2.7.4 +zipp==0.6.0 diff --git a/templates/base/footer.html b/templates/base/footer.html index 723b889..cffa1db 100644 --- a/templates/base/footer.html +++ b/templates/base/footer.html @@ -12,7 +12,7 @@ RSS Feed |  Coding in  - Github + Github
diff --git a/templates/blog/tags/article_meta_info.html b/templates/blog/tags/article_meta_info.html index b1d3f9d..d76cbc6 100644 --- a/templates/blog/tags/article_meta_info.html +++ b/templates/blog/tags/article_meta_info.html @@ -9,8 +9,10 @@ - 属于{{ article.category.name }}分类, + 属于 + {{ article.category.name }} + 分类, {% if article.tags.all %} 被贴了 @@ -27,16 +29,16 @@ {{ article.author.username }} 。 - - {% ifequal user article.author %} - 编辑 - {% endifequal %} -
- 文章最后修改于 +
+ + 最后更新时间 。 + {% ifequal user article.author %} + 编辑 + {% endifequal %} \ No newline at end of file