Chinaunix首页 | 论坛 | 博客
  • 博客访问: 28750676
  • 博文数量: 2065
  • 博客积分: 10377
  • 博客等级: 上将
  • 技术积分: 21525
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 17:50
文章分类

全部博文(2065)

文章存档

2012年(2)

2011年(19)

2010年(1160)

2009年(969)

2008年(153)

分类: Python/Ruby

2009-08-05 15:17:13

1.在Python代码中使Settings

在你的Django应用程序中,从对象 django.conf.settings 导入settings使用,例如:

from django.conf import settings

if settings.DEBUG:
# Do something


ADMIN_MEDIA_PREFIX

默认 : '/media/'

This setting is the URL prefix for admin media: CSS, JavaScript, and images. Make sure to use a trailing slash.




阅读(492) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~