Giter Site home page Giter Site logo

django_selfblog's Issues

u'djdt' is not a registered namespace 错误

按照readme.me部署,执行gunicorn selfblog.wsgi:application出现以下错误:u'djdt' is not a registered namespace
使用python manage.py runserver 没有问题.
我的环境:django==1.5.1
django-debug-toolbar==1.2.1
gunicorn==18.0
建议在requirement.txt里把依赖的库的版本号也加上吧
以上

运行时提示错误

运行后打开0.0.0.0:8000的时候出现错误:

  1. 终端显示:“from django.forms.utils import flatatt as _flatatt ImportError: No module named utils” ;
  2. 浏览器显示:"A server error occurred. Please contact the administrator"。
  3. 在终端打开python,发现输入:from django.forms.utils import flatatt as _flatatt,也是提示”ImportError: No module named utils“。
  4. 我发现是django的库依赖了这个文件,但是这个django版本却没有django.forms这个文件,不确定是否为版本bug.我安装1.7版本以上就可以导入这个库,但是其他依赖却出现问题。
  5. 暂时未能解决这个问题,不知道版主有没有解决方法,谢谢!

搭建完后,新建一篇文章出现bug

下面的操作都是按照git的安装步骤来搞的。
但是基本功能都用不了,要不是代码有bug,要不就是安装文档有疏漏。

在centOS6.5 64bit(Python 2.6.6)系统上搭建完成后
打开如下链接:
http://10.10.10.111:8000/xadmin
进入后台增加一篇博客,这一步骤没问题

但是再进入
http://10.10.10.111:8000/

点击对应博客后面的 阅读全文 这个超链接
就链接到下面这个不能打开的地址:
http://10.10.10.111:8000/.html

这个东西不是缓存,用chrom按F12看了对应实际链接就这个。
查看了对应的日志文件,还有启动后台没有任何报错。

然后我在centOS7.0 64bit(Python 2.7.57) 也试过,还是这个问题。

配置中的地址建议用相对路径代替绝对路径

你配置的所有地址都是绝对路径,而实际上几乎所有的地址都可以根据项目的相对路径进行表示。这样绝对路径,在自己电脑上弄还好,一旦涉及到克隆一份新的副本出来,更改配置就很麻烦了,而且假如在多台设备上进行开发,并且项目路径不统一,则同步起来会相当麻烦。建议全部都改成相对路径。

比如说confg/supervisord.conf

[supervisord]
logfile=/home/the5fire/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)

其中logfile实际上可以写成logfile=tmp/supervisord.log,只要保证是在项目根目录执行命令就行了。

blog案例展示

用这套源码搭建起来博客的同学不妨放着链接在这里。也方便大家参观。也可以带些流量。

跟帖格式可以如下,按照我的博客来说。

blog:http://the5fire.com
服务器:webfaction centos
部署环境:virtualenv+supervisord+nginx+django1.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.