Blog 改动备忘录

远足回来, 惊讶的发现 Picasa Web 也被墙奸了…

真是无奈, Zine 不支持附件上传, 所以 Blog 的照片基本都存放在 Picasa Web 上.

Picasa Web 最近不断抽筋, 不过根据以往的经验, 把希望寄托在 GFW 上是无知的, 更靠谱的方法还是换一个支持附件上传的 Blog 引擎.

  • 切换到 Byteflow, 支持图片上传

  • 使用 virtualen + django-cpserver + supervisor 的组合部署 Django / Byteflow

  • 安装 django-cpserver, 在 settings_local.py 文件 ADDITIONAL_APPS 中追加: ‘cpserver’

  • settings_local.py 文件 ADDITIONAL_APPS 中启用: nebulafriends apps

  • 主题转换

  • settings_local.py 时间, 日期格式:

    DATE_FORMAT = "Y-m-j, l"
    TIME_FORMAT = "H:i A"
    
  • settings_local.py 文件, 设置 reStructuredText 格式: RENDER_METHOD = ‘rst’

  • settings_local.py 文件, 设置时区: TIME_ZONE = ‘Asia/Shanghai’

  • settings_local.py 文件, 设置 SMTP 邮件信息:

    EMAIL_HOST = 'smtp.webfaction.com'
    EMAIL_HOST_USER = 'xxxxxxx'
    EMAIL_HOST_PASSWORD = 'xxxxxx'
    EMAIL_PORT = 25
    DEFAULT_FROM_EMAIL = 'xx@yy.com' # from address for server error emails
    SERVER_EMAIL = 'donot-reply@yy.com' # used as the from address for django.core.mail.mail_admins() and django.core.mail.mail_managers()
    
  • settings_local.py 文件, 把 DEBUG = True 修改成 DEBUG = False

  • FeedBurner 自动转向: FEEDBURNER = {“blog.yangyubo.com”: {“blog” : “yangyubo”, “comments” : “yangyubo_comments”} }

  • 修改 app/discussion/models.py, 将 self.body_html = render(self.body, ‘markdown’) 修改成 self.body_html = render(self.body, ‘rst’)

  • 修改 static/js/comments.js, 在 function init() 中, 注释掉 comment_form.hide(); 一行

  • 在 Webfaction 控制面板中添加 admin-media, static 等静态资源映射

Add post to:   Delicious Reddit Slashdot Digg Technorati Google

2 Comments

单纯从使用的角度上说,还是wordpress比较省心。

哈, 发烧友通常都喜欢折腾.

Leave a Reply

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image

关于 Yang Yubo

身处 IT 行业, 惯用 C/C++, 对 Python 情有独钟, 平时比较关注 QT / Django / Werkzeug 等. 了解更多 »