• Django中静态文件设置方法

http://lanceverw.iteye.com/blog/1798037

  • Django-CMS

https://www.django-cms.org/en/

  • Django学习笔记

http://www.cnblogs.com/BeginMan/archive/2013/03/22/2975511.html

  • 静态文件引用
  1.    {% load staticfiles %}

                  <img alt="" src="{% static"img/1.jpg" %}"  />

  2.  <img alt="" src="/static/img/1.jpg"   />

  • Permission matching query does not exist” exception

  Sometimes Django decides not to install the default permissions for a model and thus the change_profile permission goes missing. To fix this, run the check_permissions in Commands.. This checks all permissions and adds those that are missing.

  • NoReverseMatch:Reversefor'password_change_done'with arguments '()'and keyword arguments '{}'not found.0 pattern(s) tried:[]

To patch this problem, override the default urls until django-registration gets updated for django 1.6, and use the same names as Django.

Click here for more details.

  • ImportError: cannot import name execute_manager

django1.6中没有execute_manager应将上述import execute_manager 修改为 import execute_from_command_line

Click here for more details.

  •   next

问题引出:登录后跳转“我的订单”,“主页”或者“我的××”,

解决办法:<li><a href="/accounts/signin?next=/shop/orders">我的订单</a></li>

url like this:        http://127.0.0.1:9079/accounts/signin/?next=/shop/orders

等价于先转到 http://127.0.0.1:9079/accounts/signin/,

你可以查看next是不是传进来了:{% if next %}<input  name="next" value="{{ next }}" />{% endif %}

然后再转到/shop/orders。当然,你可以修改value=“/accounts/gallery/(username)”。参考这里

天气图标可动

posted on 2014-02-24 13:34  土豆饼  阅读(455)  评论(0编辑  收藏  举报