Skip to content

Commit

Permalink
修复travis
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Jun 25, 2019
1 parent 786356d commit 628d793
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ notes/
media/editor/*
media/photo/*
settings.py
binblog-bak.sql
binblog-bak.sql
venv/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ branches:
only:
- master # master分支

env:
global:
- DJANGO_SETTINGS_MODULE="binblog.settings_travis" # 设置Django配置文件
#env:
# global:
# - 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_example.py binblog/settings.py # 复制一份配置文件, 用于app引入相关设置
- cp binblog/settings_travis.py binblog/settings.py # 复制一份配置文件, 用于app引入相关设置

# https://codecov.io && https://coveralls.io
install:
Expand Down
2 changes: 1 addition & 1 deletion blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class SideBar(BaseModel):
""" 站点右上角的侧边栏,可以显示一些html,markdown内容 """
title = models.CharField(_('标题'), max_length=30)
content = models.TextField(_('内容'))
order = models.IntegerField(_('排序', default=1, help_text=_('越大越前')))
order = models.IntegerField(_('排序'), default=1, help_text=_('越大越前'))
is_enable = models.BooleanField(_('是否启用'), default=True)

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion user/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __str__(self):

def save(self, *args, **kwargs):
self.modify_time = now()
super().save(update_fields=('modify_time',))
super().save(*args, **kwargs)

def get_absolute_url(self):
return reverse('blog:author_article', kwargs={'author_name': self.username})
Expand Down

0 comments on commit 628d793

Please sign in to comment.