惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - febird

Python 格式化输出时间字符串函数 strftime 从IEEE802.1到IEEE802.22 CodeWarrior for Freescale S12 开发Tips - febird 第一个 Android 程序 [资料] IPv6主机地址 Web中使用MSCOMM32.OCX读写串口(2) Web中使用MSCOMM32.OCX读写串口 Matlab中Timer的使用 Matlab多窗口传值问题(GUI) My Matlab Tips (Unfinished) Matlab中使用Plot函数动态画图方法总结 Matlab GUIDE使用总结--Matlab GUI界面 Matlab Deploy工具的使用--Matlab生成可执行文件 使用matlab作为图表绘制工具--Matlab使用入门 基于DE2 与Nios II的音频录放系统的设计-软件篇 基于DE2 与Nios II的音频录放系统的设计-系统篇 GMail今天更换外观了-支持主题 Google WebMaster网站验证错误(404返回成功)解决方法 Febird.co.cc 恢复正常访问
改进 GAE cpedialog 博客程序的一些细节
febird · 2009-05-19 · via 博客园 - febird

中午吃饭时间,彻底更正了cpedialog的 多用户角色权限控制,包括删除文章的权限,系统管理权限。

下面总结一下自定义的一些地方和改进:

1. 多用户

用户分为 admin ,editor,user , anonymous 四类角色。

 匿名用户(anonymous)啥也不能干

普通登录用户(user) 只能留言

已登录后台授权用户(editor) 可以发表文章,修改自己的文章

管理员(admin) 可以做任何事情

 2. 三栏改两栏

修改了模版

 3. 更新了日志时间显示的错误

使用 blog.date |date:"l, d, M, Y" 过滤器替换原来的过滤器,输出是: “Monday, 18, May, 2009 ”  ,详见 Django文档

值得说明的一点是Google AppEngine的 Datastore中 DateTimePropert采用的是 GMT时间格式,所以比北京时间慢 8小时,需要在后台+8小时。

方法是: import datetime for blog in blogs :
                blog.date += datetime.timedelta(hours=+8)

可以参见 Google AppEngine 的 Model 时间属性类资料: DateTimePropert

 4. 汉化

汉化一部分模版文件.

 5.更改403错误也页参数过少的错误.

 view.ViewBlog.render(self) 函数 参数传递错误,修改之.

等等其他问题......

 修改后的 样子见我的 GAE Test

 cpedialog 的主页:  cpedialog