## 个人博客
—— 基于django1.10以及bootstrap3.0
----------
### 简介
> 目前博客功能拥有基本的分页、评论、详细阅读的功能
####纪录于2016.10.2
----------
>今天为博客增添了按标题搜索的功能
####纪录于2016-10-7
----------
>历经千辛万苦,终于将博客部署到好了,点击进入[我的博客][2]
####记录于2016-10-26
------------
>今天对博客的页面以及代码进行了优化,同时,添加了阅读量随点击增加的功能
```python
class ArticleDetailView(DetailView):
......
# 从数据库中获取id为pk_url_kwargs的对象
def get_object(self, queryset=None):
obj = super(ArticleDetailView, self).get_object()
# 点击一次阅读量增加一次
obj.views += 1
obj.save()
obj.body = markdown.markdown(obj.body, safe_mode='escape',
extensions=[
'markdown.extensions.nl2br',
'markdown.extensions.fenced_code'
])
return obj
......
```
####记录于2016-10-28
------------
>今天为我的博客添加了标签云的功能,其实现原理与目录实现原理基本一致,不同点在于,与Article数据库的关系变成了ManyToMany类型
#### 记录于2016-11-12
------------
>今天为我的博客添加了网页意见提出功能, 用户通过在'''关于'''界面的意见栏写下意见, 将意见信息保存到数据库并发送意见给我自己并返回感谢界面
#### 记录于2016-12-8
------------
>由于markdown2不能解析篱笆型代码块,故将其替换为了markdown
#### 记录于2017-02-7
--------
>添加日志配置
#### 记录于2017-02-8
--------
>添加[Redis][4]用以缓存文章界面
#### 记录于2017-02-21
--------
>添加[Celery][3]异步处理请求(我用来处理发送邮件时, 可能造成的阻塞(ps.没什么访问量,其实并不会发生- -))
#### 记录于2017-02-23
--------
>写了一个中间件, 用以在调试的时候, 将每次的数据库操作都打印到命令行上. [代码参考][5]
#### 记录于2017-04-04
--------
>用docker重新部署了我的django博客应用,并已写成[教程][6]供大家参考
#### 记录于2017-04-24
--------
[2]: http://182.254.129.224/
[3]: http://docs.celeryproject.org/en/latest/index.html
[4]: https://redis.io/
[5]: https://djangosnippets.org/snippets/264/
[6]: https://tomming233.github.io/2017/04/24/%E7%94%A8docker%E9%83%A8%E7%BD%B2django%E5%BA%94%E7%94%A8/
没有合适的资源?快使用搜索试试~ 我知道了~
blog.zip_django_python blog
共84个文件
py:21个
sample:10个
html:9个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 5 浏览量
2022-09-24
21:54:15
上传
评论
收藏 534KB ZIP 举报
温馨提示
一个博客用于学习django框架,适合新手学习。
资源推荐
资源详情
资源评论
收起资源包目录
blog.zip (84个子文件)
blog
logs
faillog.log 0B
dberror.log 0B
django.log 114B
.git
index 5KB
hooks
pre-push.sample 1KB
prepare-commit-msg.sample 1KB
applypatch-msg.sample 478B
pre-commit.sample 2KB
pre-receive.sample 544B
pre-applypatch.sample 424B
commit-msg.sample 896B
pre-rebase.sample 5KB
update.sample 4KB
post-update.sample 189B
config 301B
description 73B
refs
tags
heads
master 41B
remotes
origin
HEAD 32B
logs
refs
heads
master 179B
remotes
origin
HEAD 179B
HEAD 179B
packed-refs 232B
objects
info
pack
pack-9a7ef97efca90af4e3b78c64470e91f78988b9ef.pack 265KB
pack-9a7ef97efca90af4e3b78c64470e91f78988b9ef.idx 11KB
info
exclude 240B
HEAD 23B
LICENSE 1KB
app
models.py 3KB
apps.py 86B
templates
blog
pagination.html 573B
search.html 3KB
index.html 3KB
base.html 3KB
category.html 1KB
comment.html 697B
about.html 4KB
thanks.html 3KB
detail.html 2KB
__pycache__
apps.cpython-36.pyc 328B
__init__.cpython-36.pyc 129B
middleware.py 502B
static
css
bootstrap.min.css 118KB
bootstrap.css 149KB
blog-home.css 402B
fonts
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.woff2 18KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.svg 106KB
js
jquery.js 94KB
bootstrap.min.js 36KB
bootstrap.js 70KB
__init__.py 0B
migrations
0002_suggest.py 718B
__init__.py 0B
0001_initial.py 4KB
views.py 7KB
admin.py 185B
templatetags
paginate_tags.py 3KB
__init__.py 0B
tests.py 63B
tasks.py 539B
urls.py 845B
forms.py 1KB
.idea
misc.xml 262B
vcs.xml 180B
modules.xml 260B
blog.iml 1KB
workspace.xml 14KB
inspectionProfiles
profiles_settings.xml 228B
requirements
prod.txt 336B
test.txt 0B
dev.txt 431B
manage.py 824B
.gitignore 1KB
README.md 3KB
blog
__pycache__
__init__.cpython-36.pyc 280B
celery.cpython-36.pyc 569B
settings.cpython-36.pyc 4KB
wsgi.py 402B
__init__.py 191B
settings.py 7KB
urls.py 828B
celery.py 551B
共 84 条
- 1
资源评论
JaniceLu
- 粉丝: 78
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功