![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
熊猫家族
敢想,敢拼,敢赢,IT技术,研发实践,互联网,资讯,编程语言,搜索引擎,Lucene,Solr,Java,生活,旅游,吃货,熊猫吃货,微生活,健康,美食
展开
-
NameError: name 'admin' is not defined
步骤:1、修改settings.py。在INSTALLED_APPS设置中添加“django.contrib.admin”。2、运行python manage.py syncdb更新数据库3、修改urls.py。改为:# Uncomment the next two lines to enable the admin:from django.contrib impo...原创 2011-06-20 11:11:09 · 303 阅读 · 0 评论 -
在Django模板中使用css、javascript 等静态文件
个人技术博客:http://demi-panda.com 在使用Django开发的Web项目中是避免不了使用css、javascript、js等静态文件的,而对于这些静态文件的处理,django官网这样写:Django itself doesn’t serve static (media) files, such as images, style sheets, or vid...原创 2011-06-28 11:16:29 · 271 阅读 · 0 评论 -
Django-south介绍
By Calabash 使用South之前铭记:请你一定要相信他的能力,抛弃对他的不信任感。因为South给人的第一印象就是好像每个操作都在抛异常。South概述* 针对django自带的syncdb同步models和数据库的缺陷开发的数据迁移工具,可以作为syncdb的替代,South能够检测对models的更改并同步到数据库.South基...原创 2011-06-28 14:51:09 · 141 阅读 · 0 评论 -
Python 字符串操作
个人技术博客:http://demi-panda.com复制字符串Python1#strcpy(sStr1,sStr2)2sStr1 = 'strcpy'3sStr2 = sStr14sStr1 = 'strcpy2'...原创 2012-07-14 19:34:43 · 113 阅读 · 0 评论