会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 133539个问题


package com.bjsxt;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class JdbcTest {
	
	public void insertDepartment(String department_name, int location_id,float salary ){
		Connection con=null;
		Statement str=null;
		
		try {
			// con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test_2?useUnicode=true&characterEncoding=utf-8","root","root");
			con=jdbcUtil.getConnection();
			String sql="insert into department values(default,'"+department_name+"',"+location_id+","+salary+")";
			 str=con.createStatement();
			int flag=str.executeUpdate(sql);
			System.out.println(flag);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			jdbcUtil.closeResource(str, con);
			
		}
		
			
		
	}
	
	public static void updateDepartments(String department_name,int location_id,int department_id){
		 Connection con=null;
		 Statement str=null;
		 
		 try {
			Class.forName("com.mysql.jdbc.Driver");
			con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test_2?useUnicode=true&characterEncoding=utf-8","root","root");
			str=con.createStatement();
            String sql="UPDATE department d SET d.department_name='"+department_name+"',d.location_id="+location_id+" WHERE department_id="+department_id+"";
			int flag=str.executeUpdate(sql);
			System.out.println(flag); 
		} catch (ClassNotFoundException e) { 
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			if(str!=null){
				try {
					str.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
			}
			if(con!=null){
				try {
					con.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
			}
		
		
	}
		 
		 
		 
		
		
	}
	
	
	
	public static void main(String[] args) {
		JdbcTest st=new JdbcTest();
		
		//st.insertDepartment("研发部",8,4500);
		//updateDepartments("教学楼",31,2);
		st.insertDepartment("学习部",9,4500);
		
	}
	
	

}




package com.bjsxt;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ResourceBundle;

import javax.sql.DataSource;

public class jdbcUtil {
		/*private  static String driver="com.mysql.jdbc.Driver";
		private static String url="jdbc:mysql://localhost/3306/test_2?useUnicode=true&characterEncoding=utf-8";
		private static String username="root";
		private static  String password="root";*/
		private  static String driver;
		private static String url;
		private static String username;
		private static  String password;
		private static DataSource ds;
		static {
			
			ResourceBundle bundle=ResourceBundle.getBundle("jdbc.properties");
			driver=bundle.getString("driver");
			url=bundle.getString("url");
			username=bundle.getString("username");
			password=bundle.getString("password");
			try {	
				Class.forName(driver);
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
					
		}
		public static Connection getConnection(){
			
			Connection con=null;;
			try {
				con = DriverManager.getConnection(url, username, password);
			
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return con;
			
		
			
		}
		
		
		
		
		//关闭 statement;
		public static void closeStatement(Statement state){
			if(state!=null){
				try {
					state.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
				
				
			}
			
			
		}
		//关闭Connection 
		public static void closeConenection(Connection con){
			if(con!=null){
				try {
					con.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
				
			}
			
			
			
		}
		
		public static void  closeResource(Statement str,Connection con){
			closeStatement(str);
			closeConenection(con);
			
			
		}
	

}




程序异常如下:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.bjsxt.jdbcUtil
	at com.bjsxt.JdbcTest.insertDepartment(JdbcTest.java:25)
	at com.bjsxt.JdbcTest.main(JdbcTest.java:86)


请问 老师 如何解决 ?

1.PNG





JAVA 全系列/第四阶段:数据库与AI协同技术实战/JDBC技术(旧) 31306楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/手写服务器项目(旧) 31308楼

老师,当我依次点击三个多选框时,第一个和最后一个全选框没有反应,但是当我点击第一个或者最后一个全选框时三个多选框都会被选中,如果点击第一个或者最后一个全选框之后再去掉三个多选框中的任何一个第一个和最后一个全选框也都会被取消,请问老师,我该如何解决只点击三个多选框而出发全选框被选中呢


GIF.gif


代码如下:


html部分:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<link	rel="stylesheet"	type="text/css"	href="css/reset.css"/>
		<link	rel="stylesheet"	type="text/css"	href="css/jd.css"/>
		<link	rel="stylesheet"	type="text/css"	href="icon/iconfont.css"/>
		
		<!--引入JS文件-->
		<script type="text/javascript" src="js/jd.js"></script>
		
	</head>
	<body>
		
		<!--导航开始-->
			
			<div	class="nav">
				
				<div	class="warp">
					<ul	class="nav_ul1">
						<li><a href=""><i class="iconfont">&#xe620;</i>京东首页</a></li>
						<li><a href="">配送到:北京</a></li>
					</ul>
					
					<ul>
						
						<ul	class="nav_ul2">
							<li><a href="">洋洋宝贝</a><span>|</span></li>
							<li><a href="">我的订单</a><span>|</span></li>
							<li><a href="">我的京东</a><span>|</span></li>
							<li><a href="">京东会员</a><span>|</span></li>
							<li><a href="">企业采购</a><span>|</span></li>
							<li><a href="">京东手机</a><span>|</span></li>
							<li><a href="">关注京东</a><span>|</span></li>
							<li><a href="">客户服务</a><span>|</span></li>
							<li><a href="">网站导航</a></li>
						</ul>
						
					</ul>
					
				</div>
				
			</div>
		
			
		
		<!--导航结束-->
		
		<!--搜索框开始-->
		
		<div	class="search"> 
			
			<div	class="warp">
				
				<img	src="img/logo.jpg"/>
					
				<div	class="search_div">
					
					<input type="text" class="search_text"/>
					<input type="button"	value="搜索" class="search_but"/>
					
				</div>
				
				
			</div>
			
		</div>
		
		<!--搜索框结束-->
		
		<!--标题开始-->
		<div	class="title warp">
			
			<h3>全部商品</h3>
			
			<div>
				<span>配送到</span>
				
				<select>
					
					<option>昌平区</option>
					<option>朝阳区</option>
					<option>海定区</option>
					<option>顺义区</option>
					<option>大兴区</option>
					
				</select>
			</div>
			
			
		</div>
		<!--标题结束-->
		
		<!--显示菜单的开始-->
		
		<div  class="tips warp">
			<ul>
				<li>
					<input type="checkbox" name="fav" id="all" onclick="checkTest1(this)"/>
					全选
				</li>
				<li>商品</li>
				<li>单价</li>
				<li>数量</li>
				<li>小计</li>
				<li>操作</li>
			</ul>
		</div>
		
		<!--显示菜单的结束-->
		
			
		<!--商品详情展示开始-->
		
		<div class="info warp"> 
				<ul>
					<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>
					<li class="info_2"><img src="img/img1.jpg" width="80px"/></li>
					<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>
					<li class="info_4"><a>颜色:灰色+粉红</a></li>
					<li class="info_5">¥182.5</li>
					<li class="info_6">
						
						<button>-</button>
						<input type="text" name="" id="" value="1" />
						<button class="info_bot">+</button>
					</li>
					<li class="info_7">¥182.5</li>
					<li>
						<a>删除</a><br />
						<a>移到我的关注</a>
					</li>
				</ul>
			</div>
			
			<div class="info warp"> 
				<ul>
					<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>
					<li class="info_2"><img src="img/img3.jpg" width="80px"/></li>
					<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>
					<li class="info_4"><a>颜色:灰色+粉红</a></li>
					<li class="info_5">¥182.5</li>
					<li class="info_6">
						
						<button>-</button>
						<input type="text" name="fav" id="" value="1" />
						<button class="info_bot">+</button>
					</li>
					<li class="info_7">¥182.5</li>
					<li>
						<a>删除</a><br />
						<a>移到我的关注</a>
					</li>
				</ul>
			</div>
			
			<div class="info warp"> 
				<ul>
					<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>
					<li class="info_2"><img src="img/img2.jpg" width="80px"/></li>
					<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>
					<li class="info_4"><a>颜色:灰色+粉红</a></li>
					<li class="info_5">¥182.5</li>
					<li class="info_6">
						
						<button>-</button>
						<input type="text" name="" id="" value="1" />
						<button class="info_bot">+</button>
					</li>
					<li class="info_7">¥182.5</li>
					<li>
						<a>删除</a><br />
						<a>移到我的关注</a>
					</li>
				</ul>
			</div>
			
		
		<!--商品详情展示结束-->
		
		<!--结算模块开始-->
		<div class="balance warp">
			<ul class="balance_ul1">
				<li>
					<input type="checkbox" name="fav" id="" value="" onclick="checkTest1(this)" />
					全选
				</li>
				<li><a>删除选中商品</a></li>
				<li><a>移到我的关注</a></li>
				<li><a>清除下柜商品</a></li>
			</ul>
			
			<ul class="balance_ul2">
				<li>已选择<span>1</span>件商品</li>
				<li>总价  <span>¥12</span></li>
				<li>
					
					<button class="butt">去结算</button>
					
				</li>
			</ul>
			
		</div>
		<!--结算模块结束-->
		
	</body>
</html>


JS部分:



//获得所有name=fav的多选框对象		定义成全局变量
var fav = document.getElementsByName("fav");
	

//判断是否全选操作
function checkTest1(th){
	
	var flag = th.checked;//判断所选中对象有没有被勾选
	
	for(var i in fav){
			
			fav[i].checked = flag;
		}
	
}

//单选决定全选的操作
function checkTest2(){
	
	var flag = true;
	
//去掉第一个和最后一个多选框(全选框),当其他多选框都选中之后才触发全选框被勾选
	for(var i=1;i<fav.length-1;i++){//注意循环的开始和结束
		
		if(!fav[i].checked){
			
			flag = false;
			
			break;//但凡有一个多选框没被选中剩下的就可以不用判断了,跳出循环
		}
		
		
	}
	
	//根据flag的值决定全选框是否被勾选
	
	fav[0].checked = flag;//下标为0对应的是第一个全选框
	
	fav[fav.length-1].checked = flag;//下标为length-1对应的是最后一个全选框
	
	console.log(fav[0].checked);
	console.log(fav[fav.length-1].checked);
	
}


JAVA 全系列/第五阶段:网页编程和设计/Javascript 语言(旧) 31311楼

老师,当我依次点击三个多选框时,第一个和最后一个全选框没有反应,但是当我点击第一个或者最后一个全选框时三个多选框都会被选中,如果点击第一个或者最后一个全选框之后再去掉三个多选框中的任何一个第一个和最后一个全选框也都会被取消,请问老师,我该如何解决只点击三个多选框而出发全选框被选中呢


动图如下:

GIF.gif


源码如下:


html部分:


<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

<link rel="stylesheet" type="text/css" href="css/reset.css"/>

<link rel="stylesheet" type="text/css" href="css/jd.css"/>

<link rel="stylesheet" type="text/css" href="icon/iconfont.css"/>

<!--引入JS文件-->

<script type="text/javascript" src="js/jd.js"></script>

</head>

<body>

<!--导航开始-->

<div class="nav">

<div class="warp">

<ul class="nav_ul1">

<li><a href=""><i class="iconfont">&#xe620;</i>京东首页</a></li>

<li><a href="">配送到:北京</a></li>

</ul>

<ul>

<ul class="nav_ul2">

<li><a href="">洋洋宝贝</a><span>|</span></li>

<li><a href="">我的订单</a><span>|</span></li>

<li><a href="">我的京东</a><span>|</span></li>

<li><a href="">京东会员</a><span>|</span></li>

<li><a href="">企业采购</a><span>|</span></li>

<li><a href="">京东手机</a><span>|</span></li>

<li><a href="">关注京东</a><span>|</span></li>

<li><a href="">客户服务</a><span>|</span></li>

<li><a href="">网站导航</a></li>

</ul>

</ul>

</div>

</div>

<!--导航结束-->

<!--搜索框开始-->

<div class="search"> 

<div class="warp">

<img src="img/logo.jpg"/>

<div class="search_div">

<input type="text" class="search_text"/>

<input type="button" value="搜索" class="search_but"/>

</div>

</div>

</div>

<!--搜索框结束-->

<!--标题开始-->

<div class="title warp">

<h3>全部商品</h3>

<div>

<span>配送到</span>

<select>

<option>昌平区</option>

<option>朝阳区</option>

<option>海定区</option>

<option>顺义区</option>

<option>大兴区</option>

</select>

</div>

</div>

<!--标题结束-->

<!--显示菜单的开始-->

<div  class="tips warp">

<ul>

<li>

<input type="checkbox" name="fav" id="all" onclick="checkTest1(this)"/>

全选

</li>

<li>商品</li>

<li>单价</li>

<li>数量</li>

<li>小计</li>

<li>操作</li>

</ul>

</div>

<!--显示菜单的结束-->

<!--商品详情展示开始-->

<div class="info warp"> 

<ul>

<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>

<li class="info_2"><img src="img/img1.jpg" width="80px"/></li>

<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>

<li class="info_4"><a>颜色:灰色+粉红</a></li>

<li class="info_5">¥182.5</li>

<li class="info_6">

<button>-</button>

<input type="text" name="" id="" value="1" />

<button class="info_bot">+</button>

</li>

<li class="info_7">¥182.5</li>

<li>

<a>删除</a><br />

<a>移到我的关注</a>

</li>

</ul>

</div>

<div class="info warp"> 

<ul>

<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>

<li class="info_2"><img src="img/img3.jpg" width="80px"/></li>

<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>

<li class="info_4"><a>颜色:灰色+粉红</a></li>

<li class="info_5">¥182.5</li>

<li class="info_6">

<button>-</button>

<input type="text" name="fav" id="" value="1" />

<button class="info_bot">+</button>

</li>

<li class="info_7">¥182.5</li>

<li>

<a>删除</a><br />

<a>移到我的关注</a>

</li>

</ul>

</div>

<div class="info warp"> 

<ul>

<li class="info_1"><input type="checkbox" name="fav" onclick="checkTest2()"/></li>

<li class="info_2"><img src="img/img2.jpg" width="80px"/></li>

<li class="info_3"><a>【京东超市】desha春秋季儿童休闲服</a></li>

<li class="info_4"><a>颜色:灰色+粉红</a></li>

<li class="info_5">¥182.5</li>

<li class="info_6">

<button>-</button>

<input type="text" name="" id="" value="1" />

<button class="info_bot">+</button>

</li>

<li class="info_7">¥182.5</li>

<li>

<a>删除</a><br />

<a>移到我的关注</a>

</li>

</ul>

</div>

<!--商品详情展示结束-->

<!--结算模块开始-->

<div class="balance warp">

<ul class="balance_ul1">

<li>

<input type="checkbox" name="fav" id="" value="" onclick="checkTest1(this)" />

全选

</li>

<li><a>删除选中商品</a></li>

<li><a>移到我的关注</a></li>

<li><a>清除下柜商品</a></li>

</ul>

<ul class="balance_ul2">

<li>已选择<span>1</span>件商品</li>

<li>总价  <span>¥12</span></li>

<li>

<button class="butt">去结算</button>

</li>

</ul>

</div>

<!--结算模块结束-->

</body>

</html>



JS部分:





//获得所有name=fav的多选框对象 定义成全局变量

var fav = document.getElementsByName("fav");


//判断是否全选操作

function checkTest1(th){

var flag = th.checked;//判断所选中对象有没有被勾选

for(var i in fav){

fav[i].checked = flag;

}

}


//单选决定全选的操作

function checkTest2(){

var flag = true;

//去掉第一个和最后一个多选框(全选框),当其他多选框都选中之后才触发全选框被勾选

for(var i=1;i<fav.length-1;i++){//注意循环的开始和结束

if(!fav[i].checked){

flag = false;

break;//但凡有一个多选框没被选中剩下的就可以不用判断了,跳出循环

}

}

//根据flag的值决定全选框是否被勾选

fav[0].checked = flag;//下标为0对应的是第一个全选框

fav[fav.length-1].checked = flag;//下标为length-1对应的是最后一个全选框

}



JAVA 全系列/第五阶段:网页编程和设计/Javascript 语言(旧) 31312楼
JAVA 全系列/第一阶段:AI驱动的JAVA编程/数组和数据存储 31315楼
JAVA 全系列/第二十一阶段:租房网(Spring Cloud最新架构)/Livegoods第一天 31317楼
JAVA 全系列/第六阶段:项目管理与SSM框架/RBAC实战 31318楼


test14_celery_study.7z

(django_env) E:\百战卓越程序员培训之Python\第十阶段Python_Django2框架\个人练习\章节2个人练习\test14_celery_study>flower -A test14_celery_study --port=5555

[I 200710 12:47:12 command:138] Visit me at http://localhost:5555

[I 200710 12:47:12 command:145] Broker: redis://127.0.0.1:6379/0

[I 200710 12:47:12 command:146] Registered tasks:

    ['celery.accumulate',

     'celery.backend_cleanup',

     'celery.chain',

     'celery.chord',

     'celery.chord_unlock',

     'celery.chunks',

     'celery.group',

     'celery.map',

     'celery.starmap',

     'celery_app.tasks.MyHookTask',

     'celery_app.tasks.add',

     'celery_app.tasks.first_group',

     'celery_app.tasks.mul',

     'celery_app.tasks.xsum']

[I 200710 12:47:12 mixins:229] Connected to redis://127.0.0.1:6379/0

flower   -> flower:0.9.5 tornado:6.0.4 humanize:2.5.0

software -> celery:4.4.6 (cliffs) kombu:4.6.11 py:3.8.3

            billiard:3.6.3.0 redis:3.5.3

platform -> system:Windows arch:32bit, WindowsPE

            kernel version:10 imp:CPython

loader   -> celery.loaders.app.AppLoader

settings -> transport:redis results:redis://127.0.0.1:6379/0


ABSOLUTE_URL_OVERRIDES: {

 }

ADMINS: []

ALLOWED_HOSTS: []

APPEND_SLASH: True

AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS: '********'

AUTH_USER_MODEL: 'auth.User'

BASE_DIR: 'E:\\百战卓越程序员培训之Python\\第十阶段Python_Django2框架\\个人练习\\章节2个人练习\\test14_celery_study'

BROKER_URL: 'redis://127.0.0.1:6379/0'

CACHES: {

 'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS: 'default'

CACHE_MIDDLEWARE_KEY_PREFIX: '********'

CACHE_MIDDLEWARE_SECONDS: 600

CELERYBEAT_SCHEDULE: {

    'mul_every_30_seconds': {   'args': (14, 5),

                                'schedule': 5,

                                'task': 'celery_app.tasks.mul'}}

CELERY_RESULT_BACKEND: 'redis://127.0.0.1:6379/0'

CELERY_RESULT_SERIALIZER: 'json'

CELERY_TASK_RESULT_EXPIRES: 86400

CELERY_TIMAZONE: 'Asia/Shanghai'

CSRF_COOKIE_AGE: 31449600

CSRF_COOKIE_DOMAIN: None

CSRF_COOKIE_HTTPONLY: False

CSRF_COOKIE_NAME: 'csrftoken'

CSRF_COOKIE_PATH: '/'

CSRF_COOKIE_SAMESITE: 'Lax'

CSRF_COOKIE_SECURE: False

CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS: []

CSRF_USE_SESSIONS: False

DATABASES: {

    'default': {   'ATOMIC_REQUESTS': False,

                   'AUTOCOMMIT': True,

                   'CONN_MAX_AGE': 0,

                   'ENGINE': 'django.db.backends.sqlite3',

                   'HOST': '',

                   'NAME': 'E:\\百战卓越程序员培训之Python\\第十阶段Python_Django2框架\\个人练习\\章节2个人练习\\test14_celery_study\\db.sqlite3',

                   'OPTIONS': {},

                   'PASSWORD': '********',

                   'PORT': '',

                   'TEST': {   'CHARSET': None,

                               'COLLATION': None,

                               'MIRROR': None,

                               'NAME': None},

                   'TIME_ZONE': None,

                   'USER': ''}}

DATABASE_ROUTERS: '********'

DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000

DATETIME_FORMAT: 'N j, Y, P'

DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',

 '%Y-%m-%d %H:%M:%S.%f',

 '%Y-%m-%d %H:%M',

 '%Y-%m-%d',

 '%m/%d/%Y %H:%M:%S',

 '%m/%d/%Y %H:%M:%S.%f',

 '%m/%d/%Y %H:%M',

 '%m/%d/%Y',

 '%m/%d/%y %H:%M:%S',

 '%m/%d/%y %H:%M:%S.%f',

 '%m/%d/%y %H:%M',

 '%m/%d/%y']

DATE_FORMAT: 'N j, Y'

DATE_INPUT_FORMATS: ['%Y-%m-%d',

 '%m/%d/%Y',

 '%m/%d/%y',

 '%b %d %Y',

 '%b %d, %Y',

 '%d %b %Y',

 '%d %b, %Y',

 '%B %d %Y',

 '%B %d, %Y',

 '%d %B %Y',

 '%d %B, %Y']

DEBUG: True

DEBUG_PROPAGATE_EXCEPTIONS: False

DECIMAL_SEPARATOR: '.'

DEFAULT_CHARSET: 'utf-8'

DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL: 'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE: ''

DEFAULT_TABLESPACE: ''

DISALLOWED_USER_AGENTS: []

EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST: 'localhost'

EMAIL_HOST_PASSWORD: '********'

EMAIL_HOST_USER: ''

EMAIL_PORT: 25

EMAIL_SSL_CERTFILE: None

EMAIL_SSL_KEYFILE: '********'

EMAIL_SUBJECT_PREFIX: '[Django] '

EMAIL_TIMEOUT: None

EMAIL_USE_LOCALTIME: False

EMAIL_USE_SSL: False

EMAIL_USE_TLS: False

FILE_CHARSET: 'utf-8'

FILE_UPLOAD_DIRECTORY_PERMISSIONS: None

FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',

 'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440

FILE_UPLOAD_PERMISSIONS: 420

FILE_UPLOAD_TEMP_DIR: None

FIRST_DAY_OF_WEEK: 0

FIXTURE_DIRS: []

FORCE_SCRIPT_NAME: None

FORMAT_MODULE_PATH: None

FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS: []

INSTALLED_APPS: ['django.contrib.admin',

 'django.contrib.auth',

 'django.contrib.contenttypes',

 'django.contrib.sessions',

 'django.contrib.messages',

 'django.contrib.staticfiles',

 'celery_app.apps.CeleryAppConfig']

INTERNAL_IPS: []

LANGUAGES: [('af', 'Afrikaans'),

 ('ar', 'Arabic'),

 ('ast', 'Asturian'),

 ('az', 'Azerbaijani'),

 ('bg', 'Bulgarian'),

 ('be', 'Belarusian'),

 ('bn', 'Bengali'),

 ('br', 'Breton'),

 ('bs', 'Bosnian'),

 ('ca', 'Catalan'),

 ('cs', 'Czech'),

 ('cy', 'Welsh'),

 ('da', 'Danish'),

 ('de', 'German'),

 ('dsb', 'Lower Sorbian'),

 ('el', 'Greek'),

 ('en', 'English'),

 ('en-au', 'Australian English'),

 ('en-gb', 'British English'),

 ('eo', 'Esperanto'),

 ('es', 'Spanish'),

 ('es-ar', 'Argentinian Spanish'),

 ('es-co', 'Colombian Spanish'),

 ('es-mx', 'Mexican Spanish'),

 ('es-ni', 'Nicaraguan Spanish'),

 ('es-ve', 'Venezuelan Spanish'),

 ('et', 'Estonian'),

 ('eu', 'Basque'),

 ('fa', 'Persian'),

 ('fi', 'Finnish'),

 ('fr', 'French'),

 ('fy', 'Frisian'),

 ('ga', 'Irish'),

 ('gd', 'Scottish Gaelic'),

 ('gl', 'Galician'),

 ('he', 'Hebrew'),

 ('hi', 'Hindi'),

 ('hr', 'Croatian'),

 ('hsb', 'Upper Sorbian'),

 ('hu', 'Hungarian'),

 ('hy', 'Armenian'),

 ('ia', 'Interlingua'),

 ('id', 'Indonesian'),

 ('io', 'Ido'),

 ('is', 'Icelandic'),

 ('it', 'Italian'),

 ('ja', 'Japanese'),

 ('ka', 'Georgian'),

 ('kab', 'Kabyle'),

 ('kk', 'Kazakh'),

 ('km', 'Khmer'),

 ('kn', 'Kannada'),

 ('ko', 'Korean'),

 ('lb', 'Luxembourgish'),

 ('lt', 'Lithuanian'),

 ('lv', 'Latvian'),

 ('mk', 'Macedonian'),

 ('ml', 'Malayalam'),

 ('mn', 'Mongolian'),

 ('mr', 'Marathi'),

 ('my', 'Burmese'),

 ('nb', 'Norwegian Bokmål'),

 ('ne', 'Nepali'),

 ('nl', 'Dutch'),

 ('nn', 'Norwegian Nynorsk'),

 ('os', 'Ossetic'),

 ('pa', 'Punjabi'),

 ('pl', 'Polish'),

 ('pt', 'Portuguese'),

 ('pt-br', 'Brazilian Portuguese'),

 ('ro', 'Romanian'),

 ('ru', 'Russian'),

 ('sk', 'Slovak'),

 ('sl', 'Slovenian'),

 ('sq', 'Albanian'),

 ('sr', 'Serbian'),

 ('sr-latn', 'Serbian Latin'),

 ('sv', 'Swedish'),

 ('sw', 'Swahili'),

 ('ta', 'Tamil'),

 ('te', 'Telugu'),

 ('th', 'Thai'),

 ('tr', 'Turkish'),

 ('tt', 'Tatar'),

 ('udm', 'Udmurt'),

 ('uk', 'Ukrainian'),

 ('ur', 'Urdu'),

 ('uz', 'Uzbek'),

 ('vi', 'Vietnamese'),

 ('zh-hans', 'Simplified Chinese'),

 ('zh-hant', 'Traditional Chinese')]

LANGUAGES_BIDI: ['he', 'ar', 'fa', 'ur']

LANGUAGE_CODE: 'en-us'

LANGUAGE_COOKIE_AGE: None

LANGUAGE_COOKIE_DOMAIN: None

LANGUAGE_COOKIE_HTTPONLY: False

LANGUAGE_COOKIE_NAME: 'django_language'

LANGUAGE_COOKIE_PATH: '/'

LANGUAGE_COOKIE_SAMESITE: None

LANGUAGE_COOKIE_SECURE: False

LOCALE_PATHS: []

LOGGING: {

 }

LOGGING_CONFIG: 'logging.config.dictConfig'

LOGIN_REDIRECT_URL: '/accounts/profile/'

LOGIN_URL: '/accounts/login/'

LOGOUT_REDIRECT_URL: None

MANAGERS: []

MEDIA_ROOT: ''

MEDIA_URL: ''

MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE: ['django.middleware.security.SecurityMiddleware',

 'django.contrib.sessions.middleware.SessionMiddleware',

 'django.middleware.common.CommonMiddleware',

 'django.middleware.csrf.CsrfViewMiddleware',

 'django.contrib.auth.middleware.AuthenticationMiddleware',

 'django.contrib.messages.middleware.MessageMiddleware',

 'django.middleware.clickjacking.XFrameOptionsMiddleware']

MIGRATION_MODULES: {

 }

MONTH_DAY_FORMAT: 'F j'

NUMBER_GROUPING: 0

PASSWORD_HASHERS: '********'

PASSWORD_RESET_TIMEOUT_DAYS: '********'

PREPEND_WWW: False

ROOT_URLCONF: 'test14_celery_study.urls'

SECRET_KEY: '********'

SECURE_BROWSER_XSS_FILTER: False

SECURE_CONTENT_TYPE_NOSNIFF: True

SECURE_HSTS_INCLUDE_SUBDOMAINS: False

SECURE_HSTS_PRELOAD: False

SECURE_HSTS_SECONDS: 0

SECURE_PROXY_SSL_HEADER: None

SECURE_REDIRECT_EXEMPT: []

SECURE_REFERRER_POLICY: None

SECURE_SSL_HOST: None

SECURE_SSL_REDIRECT: False

SERVER_EMAIL: 'root@localhost'

SESSION_CACHE_ALIAS: 'default'

SESSION_COOKIE_AGE: 1209600

SESSION_COOKIE_DOMAIN: None

SESSION_COOKIE_HTTPONLY: True

SESSION_COOKIE_NAME: 'sessionid'

SESSION_COOKIE_PATH: '/'

SESSION_COOKIE_SAMESITE: 'Lax'

SESSION_COOKIE_SECURE: False

SESSION_ENGINE: 'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE: False

SESSION_FILE_PATH: None

SESSION_SAVE_EVERY_REQUEST: False

SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE: 'test14_celery_study.settings'

SHORT_DATETIME_FORMAT: 'm/d/Y P'

SHORT_DATE_FORMAT: 'm/d/Y'

SIGNING_BACKEND: 'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS: []

STATICFILES_DIRS: []

STATICFILES_FINDERS: ['django.contrib.staticfiles.finders.FileSystemFinder',

 'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT: None

STATIC_URL: '/static/'

TEMPLATES: [{'APP_DIRS': True,

  'BACKEND': 'django.template.backends.django.DjangoTemplates',

  'DIRS': ['E:\\百战卓越程序员培训之Python\\第十阶段Python_Django2框架\\个人练习\\章节2个人练习\\test14_celery_study\\templates'],

  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',

                                     'django.template.context_processors.request',

                                     'django.contrib.auth.context_processors.auth',

                                     'django.contrib.messages.context_processors.messages']}}]

TEST_NON_SERIALIZED_APPS: []

TEST_RUNNER: 'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR: ','

TIME_FORMAT: 'P'

TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE: 'UTC'

USE_I18N: True

USE_L10N: True

USE_THOUSAND_SEPARATOR: False

USE_TZ: True

USE_X_FORWARDED_HOST: False

USE_X_FORWARDED_PORT: False

WSGI_APPLICATION: 'test14_celery_study.wsgi.application'

X_FRAME_OPTIONS: 'DENY'

YEAR_MONTH_FORMAT: 'F Y'

is_overridden: <bound method Settings.is_overridden of <Settings "test14_celery_study.settings">>


Traceback (most recent call last):

  File "c:\users\23242\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main

    return _run_code(code, main_globals, None,

  File "c:\users\23242\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code

    exec(code, run_globals)

  File "C:\Users\23242\Envs\django_env\Scripts\flower.exe\__main__.py", line 7, in <module>

  File "c:\users\23242\envs\django_env\lib\site-packages\flower\__main__.py", line 11, in main

    flower.execute_from_commandline()

  File "c:\users\23242\envs\django_env\lib\site-packages\celery\bin\base.py", line 305, in execute_from_commandline

    return self.handle_argv(self.prog_name, argv[1:])

  File "c:\users\23242\envs\django_env\lib\site-packages\flower\command.py", line 56, in handle_argv

    return self.run_from_argv(prog_name, argv)

  File "c:\users\23242\envs\django_env\lib\site-packages\flower\command.py", line 51, in run_from_argv

    flower.start()

  File "c:\users\23242\envs\django_env\lib\site-packages\flower\app.py", line 60, in start

    self.listen(self.options.port, address=self.options.address,

  File "c:\users\23242\envs\django_env\lib\site-packages\tornado\web.py", line 2116, in listen

    server.listen(port, address)

  File "c:\users\23242\envs\django_env\lib\site-packages\tornado\tcpserver.py", line 152, in listen

    self.add_sockets(sockets)

  File "c:\users\23242\envs\django_env\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets

    self._handlers[sock.fileno()] = add_accept_handler(

  File "c:\users\23242\envs\django_env\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler

    io_loop.add_handler(sock, accept_handler, IOLoop.READ)

  File "c:\users\23242\envs\django_env\lib\site-packages\tornado\platform\asyncio.py", line 100, in add_handler

    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)

  File "c:\users\23242\appdata\local\programs\python\python38-32\lib\asyncio\events.py", line 501, in add_reader

    raise NotImplementedError

NotImplementedError


Python 全系列/第十二阶段:Python_Django3框架/Django进阶 31320楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637