Skip to content

Commit

Permalink
升级依赖和对样式小修改
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Nov 2, 2019
1 parent 833603d commit 203998d
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 进行测试
Expand Down
6 changes: 5 additions & 1 deletion binblog/settings_example.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion binblog/settings_travis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from binblog.settings import *
from binblog.settings_example import *

# 覆盖原先settings里的一些配置
# https://docs.travis-ci.com/user/database-setup/
Expand Down
1 change: 1 addition & 0 deletions log/binblog_error.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[2019-11-02 23:38:01,658] ERROR [blog.views.page_not_found:297 views] {'status': '404', 'path': '彬彬冲呀66666666'}
46 changes: 22 additions & 24 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion templates/base/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RSS Feed
</a>
|&nbsp; Coding in&nbsp;
<a href="https://github.com/enjoy-binbin/binblog-Django" target="_blank">Github</a>
<a href="https://github.com/enjoy-binbin" target="_blank">Github</a>

</div>
<div class="site-info" style="text-align: center">
Expand Down
18 changes: 10 additions & 8 deletions templates/blog/tags/article_meta_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
</span>

<span>
属于<a href="{{ article.category.get_absolute_url }}"
title="{{ article.category.name }}">{{ article.category.name }}</a>分类
属于
<a href="{{ article.category.get_absolute_url }}"
title="{{ article.category.name }}">{{ article.category.name }}
</a>分类

{% if article.tags.all %}
被贴了
Expand All @@ -27,16 +29,16 @@
<a href="{{ article.author.get_absolute_url }}" title="查看所有由{{ article.author.username }}发布的文章">
{{ article.author.username }}
</a>

{% ifequal user article.author %}
<a href="{{ article.get_admin_url }}">编辑</a>
{% endifequal %}
</span>

<br><span>
文章最后修改于
<br>
<span>
最后更新时间
<a href="{{ article.get_absolute_url }}" title="{{ article.modify_time }}">
<time datetime="{{ article.modify_time }}">{{ article.modify_time }}</time>
</a>
{% ifequal user article.author %}
<a href="{{ article.get_admin_url }}">编辑</a>
{% endifequal %}
</span>
</footer>

0 comments on commit 203998d

Please sign in to comment.