django error

错误信息:You‘re using the Django "sites framework" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error.
  原因:settings.py里# Application definition中添加了‘django.contrib.sites‘模块后需要设置SITE_ID 
  处理:在settings.py里添加配置:SITE_ID = 1

时间: 2025-01-05 02:39:23

django error的相关文章

django Error: [Errno 10013]

今天用eclipse 测试的时候出现 Quit the server with CTRL-BREAK.Error: [Errno 10013] 1 昨晚测试时还好好的,怎么突然出现这个错误,于是GOOLE,找到个帖子说可能是端口占用了,用工具查了下,果然是8000端口被KUGOU占用了,关闭KUGOU即正常了,分享出来让初学Django的童鞋少走弯路

Django Error: That port is already in use.

原文:http://stackoverflow.com/questions/20239232/error-that-port-is-already-in-use A more simple solution just type sudo fuser -k 8000/tcp. This should kill all the processes associated with port 8000. EDIT: For osx users you can use sudo lsof -t -i tc

Django Web部署平台

一.基础环境Django Web部署平台 1.角色.ip.版本.内核.软件 serverA 10.1.10.236 3.16.0-4-amd64 8.1 nginx uwsgi django python python-2.7.9 nginx-1.6.2 uwsgi-2.0.11.2 django-1.8.6 2.安装基础包 1)安装基础包 apt-get -y install gcc make python-dev python-setuptools python curl tree 2)使用

django中templates阅读笔记

一.基本知识 1.模版是独立于django的,可以独立运行. 模版变量是用两个大括号括起来的字符串,表示变量.例如{{ person_name }} 模版标签,是用一对大括号和一对百分号括起来的,例如{% if ordered_warranty %},{% for item in item_list %} 过滤器,修改变量格式.{{ ship_date|date:"F j, Y" }} 2.产生TemplateSyntaxError异常的原因有 Invalid tags Invalid

python django 的启动脚本

#!/bin/bash # Replace these three settings. PROJDIR="/var/www/t_receive_interface" PIDFILE="/var/run/django.pid" SOCKET="/tmp/django.sock" OUTLOGFILE="/var/log/django/access.out.log" ERRLOGFILE="/var/log/django

django服务器配置

服务器配置是Ubuntu14.04 64位OS ubuntu14.04默认是安装好了python2.7版本不用自己安装了. 先更新下源 sudo apt-get update 第一步先安装pip sudo apt-get install -y python-pip 有些时候安装pip前需要安装几个相关包 sudo apt-get install -y python-dev sudo apt-get install -y libevent-dev 安装完pip后我们开始安装django sudo

ubuntu下配置nginx+uwsgi+django

服务器配置是Ubuntu14.04 64位OS ubuntu14.04默认是安装好了python2.7版本不用自己安装了. 先更新下源 sudo apt-get update 第一步先安装pip sudo apt-get install -y python-pip 有些时候安装pip前需要安装几个相关包 sudo apt-get install -y python-dev sudo apt-get install -y libevent-dev 安装完pip后我们开始安装django sudo

Django syncdb mysql error on localhost -> (1045, "Access denied for user 'ODBC'@'localhost')

环境:WINDOWS系统 将数据库配置 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'HOST': 'localhost', 'PORT': 3306, 'NAME': 'yunwei', 'USERNAME': 'root', 'PASSWORD': 'mysql', } } 改为 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql',

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb的解决方法

今天自学django创建mysql数据库表的时候报了如下错误: raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb在我百度查询下,终于找到了问题所在,就是没有安装MySQL-python.基于这个问题,网上提供