My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

Requirements

安装

  1. 请先参考Python及Django安装方法安装好python和django.
  2. 解压pylogs
  3. 进入pylogs解压目录修改settings.py中的数据库类型及连接参数,并设置MEDIA_ROOT为实际media目录的绝对路径
  4. 运行python manage.py syncdb同步数据库结构

  • 运行manage.py runserver测试服务器是否能运行成功,如出错请根据错误提示修正错误。
  • 如果用到发表评论验证码功能,则需要安装PIL1.1.6。

站点参数设置

登录后台,在blog app下的"站点设置"表中添加设置项,可用的设置项:

设置名称说明
SiteName 站点名称
SiteSubTitle 站点副标题
Theme 主题名称
AuthorName 作者名称(用于feed中显示author)
SiteKeywords 站点关键字(对应head中的meta keywords)
SiteDescription 站点描述(对应head中的meta description)

如果你在安装过程中遇到问题,请到http://groups.google.com/group/pylogs 中提出。

Comment by wow73...@gmail.com, Jul 3, 2008

print "hello"

Comment by Space.Q...@gmail.com, Nov 24, 2008

最好能支持google appengine

Comment by tangf2...@gmail.com, Jan 12, 2009

最好支持GAE,我准备用你的程序把blog搬到GAE

Comment by fun...@gmail.com, Feb 15, 2009

我在lighttpd下,不知道有哪些地址需要URL_REWRITE,建议写在安装指南里。

Comment by rockla...@gmail.com, Feb 19, 2009

最好能支持google appengine

Comment by LvXue...@gmail.com, Jun 10, 2009

安装试用时发现不能保存日志,错误如下: Warning at /admin/blog/post/add/

Incorrect string value: '\xE6\x96\x87\xE7\xAB\xA0...' for column 'message' at row 1

Request Method: POST Request URL: http://10.0.1.20:82/admin/blog/post/add/ Exception Type: Warning Exception Value:

Incorrect string value: '\xE6\x96\x87\xE7\xAB\xA0...' for column 'message' at row 1

Exception Location: /usr/lib/python2.5/warnings.py in warn_explicit, line 102 Python Executable: /usr/bin/python Python Version: 2.5.4

好象是编码的问题(输入的是英文)

Comment by ngn...@gmail.com, Jul 13, 2009

和楼上一样的问题啊,没有人来解决?

Comment by vegi...@gmail.com, May 25, 2010

in django ver 1.2.0.1, do manage.py syncdb find under errors:

for (app_name, error) in get_app_errors().items():
File "C:\Python24\Lib\site-packages\django\db\models\loading.py", line 146, in
get_app_errors
self.populate()
File "C:\Python24\Lib\site-packages\django\db\models\loading.py", line 61, in
populate
self.load_app(app_name, True)
File "C:\Python24\Lib\site-packages\django\db\models\loading.py", line 78, in
load_app
models = import_module('.models', app_name)
File "C:\Python24\Lib\site-packages\django\utils\importlib.py", line 35, in im
port_module
import(name)
File "D:\wwwroot\pylogs\blog\models.py", line 65
class Admin():
^
SyntaxError?: invalid syntax

Comment by vegi...@gmail.com, May 25, 2010

and fix this error:change "blog/models.py" line 65 to "class Admin:", syncdb is ok, then manage.py runserver has no errors, bug view "http://localhost:8000" in browser have under errors:

Environment:

Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.2 Python Version: 2.4.3 Installed Applications: ['django.contrib.auth',

'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'blog', 'todo', 'filemanager', 'wap']
Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware?',
'django.middleware.locale.LocaleMiddleware?', 'django.middleware.common.CommonMiddleware?', 'django.contrib.auth.middleware.AuthenticationMiddleware?', 'django.middleware.doc.XViewMiddleware')

Template error: In template d:\wwwroot\pylogs\templates\themes\techicon\blog\list.html, error at line 2

Caught AttributeError? while rendering: 'ThemeExtendsNode?' object has no attribute 'blocks'
  1. : {% load i18n themes posttags %}

2 : {% theme_extends "base.html" %}
3 : {% block title %}{{pagetitle}} - {{ block.super }} {% endblock %}
4 : <!-- Start of RECENT -->
5 : {% block recent %}
6 : {% if show_recent %}
7 : <div id="recent">
8 : <div id="titles">
9 : <div id="title1">{% trans "Latest Posts" %} »</div>
  1. : <div id="title2">{% trans "Latest Comments" %} »</div>
  1. : <div id="title3">{% trans "Popular Posts" %} »</div>
  1. : </div>

Traceback: File "C:\Python24\Lib\site-packages\django\core\handlers\base.py" in get_response

  1. 0. response = callback(request, callback_args, callback_kwargs)
File "D:\wwwroot\pylogs\blog\views.py" in index
25. return renderPaggedPosts(pageid,('Home'),pagedPosts,True,request)
File "D:\wwwroot\pylogs\blog\views.py" in renderPaggedPosts
200. context_instance=RequestContext?(request))
File "C:\Python24\Lib\site-packages\django\shortcuts\
init.py" in render_to_response
20. return HttpResponse?(loader.render_to_string(args, kwargs), httpresponse_kwargs)
File "C:\Python24\Lib\site-packages\django\template\loader.py" in render_to_string
  1. 6. return t.render(context_instance)
File "C:\Python24\Lib\site-packages\django\template\
init.py" in render
  1. 3. return self.render(context)
File "C:\Python24\Lib\site-packages\django\template\init.py" in render
  1. 7. return self.nodelist.render(context)
File "C:\Python24\Lib\site-packages\django\template\
init.py" in render
796. bits.append(self.render_node(node, context))
File "C:\Python24\Lib\site-packages\django\template\debug.py" in render_node
72. result = node.render(context)
File "C:\Python24\Lib\site-packages\django\template\loader_tags.py" in render
  1. 0. block_context.add_blocks(self.blocks)

Exception Type: TemplateSyntaxError? at / Exception Value: Caught AttributeError? while rendering: 'ThemeExtendsNode?' object has no attribute 'blocks'

Comment by ijti...@gmail.com, Jun 7, 2010

python2.6 出现同样的问题,求解决办法...

Comment by ijti...@gmail.com, Jun 7, 2010

换了版本就安装成功了

python2.5 Django-1.0.2-final 目前好像不支持 python2.6 Django-1.2.1

安装失败,就用2.5来安装吧。

Comment by IDGnarn@gmail.com, Sep 11, 2010

不支持2.6么。。。。

Comment by 54215...@qq.com, May 3, 2011

请问这是为什么 ?AttributeError? at /admin/ 'AdminSite?' object has no attribute 'root'Request Method: GET Request URL: http://127.0.0.1/admin/ Django Version: 1.3 Exception Type: AttributeError? Exception Value: 'AdminSite?' object has no attribute 'root' Exception Location: D:\Python26\Lib\site-packages\django\pylogs\urls.py in <module>, line 19 Python Executable: D:\Python26\python.exe Python Version: 2.6.0

Comment by yxy....@gmail.com, May 23, 2011

我也是

Comment by 16ec....@gmail.com, May 25, 2011

pylogs位置 E:\pylogs

C:\>python Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) v.1310 32 bit (Intel)? on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import django >>> django.VERSION (1, 0, 2, 'final', 0) >>> import PIL (PIL1.1.6版无误) >>> >>> import MySQLdb (MySQLdb 无误) >>>

E:\pylogs>python manage.py validate 0 errors found

在mysql中建立一个数据库名为:pylogs

初始化数据库 python E:\pylogs\manage.py syncdb

E:\pylogs>python manage.py runserver Validating models... 0 errors found

Django version 1.0.2 final, using settings 'pylogs.settings Development server is running at http://127.0.0.1:8000/

在浏览器中输入 http://127.0.0.1:8000/

就可以看到结果了。

pylogs非常棒。感谢pylogs开发小组。


Sign in to add a comment
Powered by Google Project Hosting