【Django】4 Django模型

每个模型是一个Python 类,集成django.db.models.Modle类

该模型的每个属性表示一个数据库表字段

通过API 自动生成数据库访问 .../sign/modles.py 文件,通过模型完成表创建。

 TypeError: ForeignKey.__init__() missing 1 required positional argument: 'on_delete'

在创建一个新模型时 ,出现错误TypeError: ForeignKey.__init__() missing 1 required positional argument: ‘on_delete‘_爱吃龙虾的小黑的博客-CSDN博客

E:\data\python\djaongo_prj\guest>  python manage.py makeigrations sign
Traceback (most recent call last):File "E:\data\python\djaongo_prj\guest\manage.py", line 21, in <module>main()File "E:\data\python\djaongo_prj\guest\manage.py", line 17, in mainexecute_from_command_line(sys.argv)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_lineutility.execute()File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\__init__.py", line 416, in executedjango.setup()File "D:\software\python3\anconda3\Lib\site-packages\django\__init__.py", line 24, in setupapps.populate(settings.INSTALLED_APPS)File "D:\software\python3\anconda3\Lib\site-packages\django\apps\registry.py", line 116, in populateapp_config.import_models()File "D:\software\python3\anconda3\Lib\site-packages\django\apps\config.py", line 269, in import_modelsself.models_module = import_module(models_module_name)File "D:\software\python3\python310\lib\importlib\__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1050, in _gcd_importFile "<frozen importlib._bootstrap>", line 1027, in _find_and_loadFile "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 688, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 883, in exec_moduleFile "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removedFile "E:\data\python\djaongo_prj\guest\sign\models.py", line 20, in <module>class Guest(models.Model):File "E:\data\python\djaongo_prj\guest\sign\models.py", line 21, in Guestevent = models.ForeignKey(Event)  # 关联发布会id
TypeError: ForeignKey.__init__() missing 1 required positional argument: 'on_delete'

 必须要设置级联删除,也就是当你删除一条信息时,会级联的删除所有和这一条信息对应的另一张表的多个信息,也就是指定on_delete=models.CASCADE

event = models.ForeignKey(Event,on_delete=models.CASCADE)  # 关联发布会id

# 嘉宾
class Guest(models.Model):event = models.ForeignKey(Event,on_delete=models.CASCADE)  # 关联发布会idrealname = models.CharField(max_length=64)  # 姓名phone = models.CharField(max_length=16)  # 手机号email = models.EmailField()  # 邮箱sign = models.BooleanField()  # 签到状态create_time = models.DateTimeField(auto_now=True)  # 创建时间(自动获取当前时间)class Meta:unique_together = ('phone', 'event')def __str__(self):return self.realname

 python manage.py makemigrations sign

E:\data\python\djaongo_prj\guest>  python manage.py makemigrations sign
System check identified some issues:WARNINGS:
sign.Event: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.HINT: Configure the DEFAULT_AUTO_FIELD setting or the SignConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
sign.Guest: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.HINT: Configure the DEFAULT_AUTO_FIELD setting or the SignConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
Migrations for 'sign':sign\migrations\0001_initial.py- Create model Event- Create model Guest

  python manage.py migrate

E:\data\python\djaongo_prj\guest>  python manage.py migrate
System check identified some issues:WARNINGS:
sign.Event: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.HINT: Configure the DEFAULT_AUTO_FIELD setting or the SignConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
sign.Guest: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.HINT: Configure the DEFAULT_AUTO_FIELD setting or the SignConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
Operations to perform:Apply all migrations: admin, auth, contenttypes, sessions, sign
Running migrations:Applying auth.0012_alter_user_first_name_max_length... OKApplying sign.0001_initial... OKE:\data\python\djaongo_prj\guest>

admin  后台 管理

from django.contrib import admin# Register your models here.
#  admin 后台管理  创建的发布会和嘉宾表示同样可以通过Admin 后台管理
from  django.contrib  import  admin
from  sign.models import   Event ,Guest# Register your models here.
class EventAdmin(admin.ModelAdmin):list_display = ['name', 'status', 'start_time','id']search_fields = ['name']    # 搜索功能list_filter = ['status']    # 过滤器class GuestAdmin(admin.ModelAdmin):list_display = ['realname', 'phone','email','sign','create_time','event_id']list_display_links = ('realname', 'phone') # 显示链接search_fields = ['realname','phone']       # 搜索功能list_filter = ['sign']                 # 过滤器admin.site.register(Event, EventAdmin)
admin.site.register(Guest, GuestAdmin)

Microsoft Windows [版本 10.0.19045.3448]
(c) Microsoft Corporation。保留所有权利。E:\data\python\djaongo_prj\guest>python   manage.py shell
Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.10.0 -- An enhanced Interactive Python. Type '?' for help.In [1]:In [1]:In [1]: from sign.models import Event,GuestIn [2]: Event.objects.all()
Out[2]: <QuerySet [<Event: 小米5发布会>]>In [3]:

from sign.models import Event,Guest  导入模块

 Event.objects.all()   所有对象

配置 MySQL  

 pip  install pymysql

数据库创建表

报错 [Err] 1055 - Expression #1 of ORDER BY

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated_Ricardo · M · YUAN的博客-CSDN博客

 

在配置文件的末尾加上这段代码:
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

 

CREATE TABLE `sign_event` (`id` int NOT NULL AUTO_INCREMENT,`name` varchar(50) DEFAULT NULL COMMENT '名称',`limit` int DEFAULT NULL COMMENT 'limit',`status` varchar(1) DEFAULT '1' COMMENT '状态   0:隐藏   1:显示',`address` varchar(500) DEFAULT NULL COMMENT '地址',start_time DATE,create_time DATE,PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='系统配置信息表';
CREATE TABLE `sign_guest` (`event_id` int NOT NULL ,`realname` varchar(50) DEFAULT NULL COMMENT '名称',`phone` varchar(11) COMMENT '手机号',`email` varchar(50) ,`sign` VARCHAR(1) DEFAULT '1' COMMENT '状态   0:隐藏   1:显示',create_time DATE,PRIMARY KEY (`event_id`,`phone`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='嘉宾表';

insert into  sign_guest(realname,phone,email,sign,event_id,create_time)values("tom","12344444","1111@qq.com",1,123456,now())


select * from sign_guest

 

from pymysql import cursors, connect# 连接数据库
conn = connect(host='192.168.56.10', user='root', password='root',db='guest', charset='utf8mb4', cursorclass=cursors.DictCursor)try:with conn.cursor() as cursors:# 创建嘉宾数据sql = 'insert into  sign_guest(realname,phone,email,sign,event_id,create_time)values("tom2","12344444","1111@qq.com",1,123456,now())'cursors.execute(sql)conn.commit()with conn.cursor() as cursor:# 查询sql = "select  *  from sign_guest where phone=%s"cursor.execute(sql, ('12344444',))res = cursor.fetchone()print(res)
finally:conn.close()

 

 Django 连接 mysql 


DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3','NAME': os.path.join(BASE_DIR, 'db.sqlite3'),}
}

 

 

 

import pymysql
pymysql.install_as_MySQLdb()"""
如果你使用pymysql驱动的话,上面两行必须添加。
"""

 

E:\data\python\djaongo_prj\guest> python  manage.py migrate
Traceback (most recent call last):File "E:\data\python\djaongo_prj\guest\manage.py", line 21, in <module>main()File "E:\data\python\djaongo_prj\guest\manage.py", line 17, in mainexecute_from_command_line(sys.argv)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_lineutility.execute()File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\__init__.py", line 436, in executeself.fetch_command(subcommand).run_from_argv(self.argv)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\base.py", line 412, in run_from_argvself.execute(*args, **cmd_options)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\base.py", line 458, in executeoutput = self.handle(*args, **options)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\base.py", line 106, in wrapperres = handle_func(*args, **kwargs)File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\commands\migrate.py", line 100, in handleself.check(databases=[database])File "D:\software\python3\anconda3\Lib\site-packages\django\core\management\base.py", line 485, in checkall_issues = checks.run_checks(File "D:\software\python3\anconda3\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checksnew_errors = check(app_configs=app_configs, databases=databases)File "D:\software\python3\anconda3\Lib\site-packages\django\core\checks\model_checks.py", line 36, in check_all_modelserrors.extend(model.check(**kwargs))File "D:\software\python3\anconda3\Lib\site-packages\django\db\models\base.py", line 1558, in check*cls._check_indexes(databases),File "D:\software\python3\anconda3\Lib\site-packages\django\db\models\base.py", line 2002, in _check_indexesconnection.features.supports_expression_indexesFile "D:\software\python3\anconda3\Lib\site-packages\django\utils\functional.py", line 57, in __get__res = instance.__dict__[self.name] = self.func(instance)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\mysql\features.py", line 317, in supports_expression_indexesnot self.connection.mysql_is_mariadbFile "D:\software\python3\anconda3\Lib\site-packages\django\utils\functional.py", line 57, in __get__res = instance.__dict__[self.name] = self.func(instance)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\mysql\base.py", line 439, in mysql_is_mariadbreturn "mariadb" in self.mysql_server_info.lower()File "D:\software\python3\anconda3\Lib\site-packages\django\utils\functional.py", line 57, in __get__res = instance.__dict__[self.name] = self.func(instance)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\mysql\base.py", line 425, in mysql_server_inforeturn self.mysql_server_data["version"]File "D:\software\python3\anconda3\Lib\site-packages\django\utils\functional.py", line 57, in __get__res = instance.__dict__[self.name] = self.func(instance)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\mysql\base.py", line 399, in mysql_server_datawith self.temporary_connection() as cursor:File "D:\software\python3\python310\lib\contextlib.py", line 135, in __enter__return next(self.gen)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 705, in temporary_connectionwith self.cursor() as cursor:File "D:\software\python3\anconda3\Lib\site-packages\django\utils\asyncio.py", line 26, in innerreturn func(*args, **kwargs)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 330, in cursorreturn self._cursor()File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 306, in _cursorself.ensure_connection()File "D:\software\python3\anconda3\Lib\site-packages\django\utils\asyncio.py", line 26, in innerreturn func(*args, **kwargs)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 289, in ensure_connectionself.connect()File "D:\software\python3\anconda3\Lib\site-packages\django\utils\asyncio.py", line 26, in innerreturn func(*args, **kwargs)File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 272, in connectself.init_connection_state()File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\mysql\base.py", line 257, in init_connection_statesuper().init_connection_state()File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 239, in init_connection_stateself.check_database_version_supported()File "D:\software\python3\anconda3\Lib\site-packages\django\db\backends\base\base.py", line 214, in check_database_version_supportedraise NotSupportedError(
django.db.utils.NotSupportedError: MySQL 8 or later is required (found 5.7.36).E:\data\python\djaongo_prj\guest>

 

django.db.utils.NotSupportedError: MySQL 8 or later is required (found 5.7.36).

django.db.utils.NotSupportedError: MySQL 8 or later is required (found 5.7.2)简单快速的解决办法_疯狂的小强呀的博客-CSDN博客

这个问题是说我们的Django框架版本比较新,已经不支持MySQL老版本5.7.2了,MySQL8或者更新的版本才是我们需要的或者说匹配的。

解决方案

从问题出发的解决方案有两个,①卸载老版本的MySQL,安装项目支持的新版本 ②降低Django框架的版本

pip uninstall django 

pip install django==2.1.13 

 要重启pycharm

Error: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试。

Django-解决报错Error: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试。_Python454的博客-CSDN博客 

 E:\data\python\djaongo_prj\guest>netstat -aon|findstr "8000"
  TCP    0.0.0.0:8000           0.0.0.0:0              LISTENING       14756
  UDP    0.0.0.0:8000           *:*

PID =14756

任务管理器 详细信息

 

 

D:\software\python3\python310\python.exe E:/data/python/djaongo_prj/guest/manage.py runserver 127.0.0.1:8001
D:\software\python3\anconda3\Lib\site-packages\numpy\__init__.py:138: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-servicefrom . import _distributor_init
D:\software\python3\anconda3\Lib\site-packages\numpy\__init__.py:138: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-servicefrom . import _distributor_init
Performing system checks...System check identified no issues (0 silenced).You have 16 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions, sign.
Run 'python manage.py migrate' to apply them.
October 02, 2023 - 21:57:38
Django version 2.1.13, using settings 'guest.settings'
Starting development server at http://127.0.0.1:8001/
Quit the server with CTRL-BREAK.

 设置  runserver 127.0.0.1:8001

 启动成功

 删除 数据库中 sign_event  表

python  manage.py migrate

  File "D:\software\python3\anconda3\Lib\site-packages\pymysql\protocol.py", line 221, in raise_for_errorerr.raise_mysql_exception(self._data)File "D:\software\python3\anconda3\Lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exceptionraise errorclass(errno, errval)
django.db.utils.OperationalError: (1050, "Table 'sign_event' already exists")E:\data\python\djaongo_prj\guest>python  manage.py migrate
Operations to perform:Apply all migrations: admin, auth, contenttypes, sessions, sign
Running migrations:Applying sign.0001_initial... OKE:\data\python\djaongo_prj\guest>

重新生成后台管理admin

 python manage.py createsuperuser

E:\data\python\djaongo_prj\guest>python manage.py createsuperuser
Username (leave blank to use 'administrator'): admin
Email address: 11111@qq.com
Password:
Password (again):
Superuser created successfully.

 http://127.0.0.1:8001/admin/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/146788.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

leetcode-239-滑动窗口最大值

题意描述&#xff1a; 给你一个整数数组 nums&#xff0c;有一个大小为 k 的滑动窗口从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口内的 k 个数字。滑动窗口每次只向右移动一位。 返回 滑动窗口中的最大值 。 示例&#xff1a; 输入&#xff1a;nums [1,3,-1,…

聊聊常见的IO模型 BIO/NIO/AIO 、DIO、多路复用等IO模型

聊聊常见的IO模型 BIO/NIO/AIO/DIO、IO多路复用等IO模型 文章目录 一、前言1. 什么是IO模型2. 为什么需要IO模型 二、常见的IO模型1. 同步阻塞IO&#xff08;Blocking IO&#xff0c;BIO&#xff09;2. 同步非阻塞IO&#xff08;Non-blocking IO&#xff0c;NIO&#xff09;3.…

C++核心编程--对象篇

4.2、对象 4.2.1、对象的初始化和清理 用于对对象进行初始化设置&#xff0c;以及对象销毁前的清理数据的设置。 构造函数和析构函数 防止对象初始化和清理也是非常重要的安全问题 一个对象或变量没有初始化状态&#xff0c;对其使用后果是未知的同样使用完一个对象或变量&…

Mysql主从复制数据架构全面解读

大家好&#xff0c;我是山子&#xff0c;今天给大家分析Mysql 实现主从复制的方方面面&#xff0c;主从复制当然也是我们做读写分离的前提&#xff0c;以下内容是从各网络平台摘录整理总结归纳在一起的&#xff1b;内容已经从主从复制的各方面的维度进行了阐述&#xff1b;非常…

Airtool for Mac——高效便捷的系统菜单栏网络工具!

在我们的数字化生活中&#xff0c;对于网络连接的稳定性和速度有着越来越高的需求。为了满足您对网络质量的实时监测和分析的需求&#xff0c;我们向大家介绍一款强大的Mac系统菜单栏网络工具——Airtool&#xff01; Airtool是一款专为Mac设计的网络工具&#xff0c;它能够提…

JUC第十三讲:JUC锁: ReentrantLock详解

JUC第十三讲&#xff1a;JUC锁: ReentrantLock详解 本文是JUC第十三讲&#xff0c;JUC锁&#xff1a;ReentrantLock详解。可重入锁 ReentrantLock 的底层是通过 AbstractQueuedSynchronizer 实现&#xff0c;所以先要学习上一章节 AbstractQueuedSynchronizer 详解。 文章目录 …

java并发编程 守护线程 用户线程 main

经常使用线程&#xff0c;没有对守护线程和用户线程的区别做彻底了解 下面写4个例子来验证一下 源码如下 /* Whether or not the thread is a daemon thread. */ private boolean daemon false;/*** Marks this thread as either a {linkplain #isDaemon daemon} thread*…

【Java 进阶篇】使用 JDBC 更新数据详解

在关系型数据库中&#xff0c;更新数据是一项常见的任务。通过Java JDBC&#xff08;Java Database Connectivity&#xff09;&#xff0c;我们可以使用Java编程语言来执行更新操作&#xff0c;例如修改、删除或插入数据。本文将详细介绍如何使用JDBC来进行数据更新操作&#x…

第 365 场 LeetCode 周赛题解

A 有序三元组中的最大值 I 参考 B B B 题做法… class Solution { public:using ll long long;long long maximumTripletValue(vector<int> &nums) {int n nums.size();vector<int> suf(n);partial_sum(nums.rbegin(), nums.rend(), suf.rbegin(), [](int x…

Python|OpenCV-如何给目标图像添加边框(7)

前言 本文是该专栏的第7篇,后面将持续分享OpenCV计算机视觉的干货知识,记得关注。 在使用opencv处理图像的时候,会不可避免的对图像的一些具体区域进行一些操作。比如说,想要给目标图像创建一个围绕图像的边框。简单的来说,就是在图片的周围再填充一个粗线框。具体效果,…

笔记二:odoo搜索、筛选和分组

一、搜索 1、xml代码 <!--搜索和筛选--><record id"view_search_book_message" model"ir.ui.view"><field name"name">book_message</field><field name"model">book_message</field><field…

【Java 进阶篇】JDBC ResultSet 类详解

在Java应用程序中&#xff0c;与数据库交互通常涉及执行SQL查询以检索数据。一旦执行查询&#xff0c;您将获得一个ResultSet对象&#xff0c;该对象包含查询结果的数据。本文将深入介绍ResultSet类&#xff0c;它是Java JDBC编程中的一个核心类&#xff0c;用于处理查询结果。…

几个推荐程序员养成的好习惯

本文框架 前言case1 不想当然case2 不为了解决问题而解决问题case3 不留问题死角case4 重视测试环节 前言 中秋国庆双节至&#xff0c;旅行or回乡探亲基本是大家的选择&#xff0c;看看风景或陪陪家人确实是个难得的机会。不过我的这次假期选择了闭关&#xff0c;不探亲&#…

layuiselect设置为不可下拉选取

$("#exam").siblings(".layui-form-select").find("dl").remove(); 或 layuiSelectDisable($("#exam")); // 设置selet元素不可下拉选择function layuiSelectDisable(selectElem) {try {var dlElem selectElem.siblings(".layu…

消息队列-RabbitMQ(二)

接上文《消息队列-RabbitMQ&#xff08;一&#xff09;》 Configuration public class RabbitMqConfig {// 消息的消费方json数据的反序列化Beanpublic RabbitListenerContainerFactory<?> rabbitListenerContainerFactory(ConnectionFactory connectionFactory){Simple…

如何用画图将另一个图片中的成分复制粘贴?

一、画图是什么&#xff1f; 画图是Windows自带的一个附件&#xff0c;可于菜单中的Windows附件文件夹中找到&#xff08;自带的为2D画图&#xff0c;有需要的可以下载3D画图&#xff09;&#xff0c;可以用来编辑或查看图片&#xff0c;也可以用来绘制图片&#xff0c;并将图…

扫地机器人经营商城小程序的作用是什么

扫地机器人对人们生活大有帮助&#xff0c;近些年也有不少企业开创品牌&#xff0c;在电商平台每年销量也非常高&#xff0c;同行竞争激烈及私域化程度加深情况下&#xff0c;虽然第三方平台或线下方式也有生意&#xff0c;但互联网电商发展也为商家们带来了诸多痛点。 那么通…

Ant-Design-Vue:a-range-picker组件国际化配置

在使用Ant-Design-Vue中的时间范围选择器开发个人项目时&#xff0c;发现默认显示为英文。如何解决呢&#xff1f; date-picker分类 Antd-Vue提供了DatePicker、MonthPicker、RangePicker、WeekPicker 几种类型的时间选择器&#xff0c;分别用于选择日期、月份、日期范围、周范…

TensorFlow入门(一、环境搭建)

一、下载安装Anaconda 下载地址:http://www.anaconda.comhttp://www.anaconda.com 下载完成后运行exe进行安装 二、下载cuda 下载地址:http://developer.nvidia.com/cuda-downloadshttp://developer.nvidia.com/cuda-downloads 下载完成后运行exe进行安装 安装后winR cmd进…

快速开发微信小程序之一登录认证

一、背景 记得11、12年的时候大家一窝蜂的开始做客户端Android、IOS开发&#xff0c;我是14年才开始做Andoird开发&#xff0c;干了两年多&#xff0c;然后18年左右微信小程序火了&#xff0c;我也做了两个小程序&#xff0c;一个是将原有牛奶公众号的功能迁移到小程序&#x…