执行 python manage.py makemigrations 提示错误

Traceback (most recent call last):
File "manage.py", line 23, in
main()
File "manage.py", line 19, in main
execute_from_command_line(sys.argv)
File "D:\codeProgram\python3.7\lib\site-packages\django\core\management__init__.py", line 381, in execute_from_command_line
utility.execute()
File "D:\codeProgram\python3.7\lib\site-packages\django\core\management__init__.py", line 357, in execute
django.setup()
File "D:\codeProgram\python3.7\lib\site-packages\django__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\codeProgram\python3.7\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "D:\codeProgram\python3.7\lib\site-packages\django\apps\config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "D:\codeProgram\python3.7\lib\importlib__init__.py", line 127, in import_module
return bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "D:\codeStudy\django企业开发实战\typeidea\typeidea\blog\models.py", line 8, in
class Category(models.Model):
File "D:\codeStudy\django企业开发实战\typeidea\typeidea\blog\models.py", line 20, in Category
owner = models.ForeignKey(User, verbose_name="作者")
TypeError: __init
_() missing 1 required positional argument: 'on_delete'

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib.auth.models import User
from django.db import models


class Category(models.Model):
    STATUS_NORMAL = 1
    STATUS_DELETE = 0
    STATUS_ITEMS = (
        (STATUS_NORMAL, '正常'),
        (STATUS_DELETE, '删除'),
    )

    name = models.CharField(max_length=50, verbose_name="名称")
    status = models.PositiveIntegerField(
        default=STATUS_NORMAL, choices=STATUS_ITEMS, verbose_name="状态")
    is_nav = models.BooleanField(default=False, verbose_name="是否为导航")
    owner = models.ForeignKey(User, verbose_name="作者")
    created_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")

    class Meta:
        verbose_name = verbose_name_plural = '分类'


class Tag(models.Model):
    STATUS_NORMAL = 1
    STATUS_DELETE = 0
    STATUS_ITEMS = (
        (STATUS_NORMAL, '正常'),
        (STATUS_DELETE, '删除'),
    )

    name = models.CharField(max_length=10, verbose_name="名称")
    status = models.PositiveIntegerField(
        default=STATUS_NORMAL, choices=STATUS_ITEMS, verbose_name="状态")
    owner = models.ForeignKey(User, verbose_name="作者")
    created_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")

    class Meta:
        verbose_name = verbose_name_plural = '标签'


class Post(models.Model):
    STATUS_NORMAL = 1
    STATUS_DELETE = 0
    STATUS_DRAFT = 2
    STATUS_ITEMS = (
        (STATUS_NORMAL, '正常'),
        (STATUS_DELETE, '删除'),
        (STATUS_DRAFT, '草稿'),
    )

    title = models.CharField(max_length=255, verbose_name="标题")
    desc = models.CharField(max_length=1024, blank=True, verbose_name="摘要")
    content = models.TextField(verbose_name="正文", help_text="正文必须为MarkDown格式")
    status = models.PositiveIntegerField(
        default=STATUS_NORMAL, choices=STATUS_ITEMS, verbose_name="状态")
    category = models.ForeignKey(Category, verbose_name="分类")
    tag = models.ManyToManyField(Tag, verbose_name="标签")
    owner = models.ForeignKey(User, verbose_name="作者")
    created_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")

    class Meta:
        verbose_name = verbose_name_plural = "文章"

3个回答

django新版本中,如果有外键关联,必须要指定 on_delete=on_delete是当删除关联表中的数据时,当前表与其关联的行的行为
可设置的值有

on_delete=None,             # 当删除关联表中的数据时,当前表与其关联的行的行为
                                        - models.CASCADE,删除关联数据,与之关联也删除
                                        - models.DO_NOTHING,删除关联数据,引发错误IntegrityError
                                        - models.PROTECT,删除关联数据,引发错误ProtectedError
                                        - models.SET_NULL,删除关联数据,与之关联的值设置为null(前提FK字段需要设置为可空)
                                        - models.SET_DEFAULT,删除关联数据,与之关联的值设置为默认值(前提FK字段需要设置默认值)
                                        - models.SET,删除关联数据,
                                                      a. 与之关联的值设置为指定值,设置:models.SET(值)
                                                      b. 与之关联的值设置为可执行对象的返回值,设置:models.SET(可执行对象)

owner = models.ForeignKey(User, verbose_name="作者")
TypeError: __init_() missing 1 required positional argument: 'on_delete'
先看报的错误,其他不用管,最后一行说明了问题,函数内部缺失了一个必要的参数'on_delete',那把这个参数加上去就好了,
owner = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name="作者")
on_delete=models.CASCADE 意思是主表删除外键所在表也删除,看上面那楼解释就好了。
外键还可以加 related_name='owner_user',啥都行,规范我忘了,反正可以通过这个使用_set直接去查询,具体可以百度。

init方法使用与功能:
1.用来构造初始化函数,用来给类的实例进行初始化属性,所以可以不需要返回值
2.在创建类的实例时系统自动调用
3.自定义类如果不定义的话,默认调用父类object的,同理继承也是,子类若无,调 用父类,若有,调用自己的

qq_41970551
qq_975336710 谢谢
5 个月之前 回复
qq_41970551
qq_975336710 借楼问一句,django中 models.Book.objects.all() 和Book.objects.all()的区别是啥,一个通过模型层调用,一个直接数据库?all()之类的区别我知道不用回答
5 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
django中创建表python manage.py makemigrations出现以下错误 ,望大神指导

![图片说明](https://img-ask.csdn.net/up load/201812/05/1544007099_480215.jpg) ![图片说明](https://img-ask.csdn.net/upload/201812/05/1544012043_872565.jpg) C:\Users\Administrator\PycharmProjects\mysite>python manage.py makemigrations Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\mysql\base.py", line 227, in get_new_connection return Database.connect(**conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\__init__. py", line 94, in Connect return Connection(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 327, in __init__ self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 598, in connect self._request_authentication() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 873, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 253, in caching_sha2_password_auth pkt = _roundtrip(conn, data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 112, in _roundtrip pkt = conn._read_packet() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 683, in _read_packet packet.check_error() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\protocol. py", line 220, in check_error err.raise_mysql_exception(self._data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\__init__.py", line 381, in execute_from_command_line utility.execute() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 316, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 353, in execute output = self.handle(*args, **options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 83, in wrapped res = handle_func(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\commands\makemigrations.py", line 103, in handle loader.check_consistent_history(connection) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\loader.py", line 281, in check_consistent_history applied = recorder.applied_migrations() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\recorder.py", line 61, in applied_migrations if self.has_table(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\recorder.py", line 44, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cur sor()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 255, in cursor return self._cursor() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 232, in _cursor self.ensure_connection() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.p y", line 89, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\mysql\base.py", line 227, in get_new_connection return Database.connect(**conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\__init__. py", line 94, in Connect return Connection(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 327, in __init__ self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 598, in connect self._request_authentication() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 873, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 253, in caching_sha2_password_auth pkt = _roundtrip(conn, data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 112, in _roundtrip pkt = conn._read_packet() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 683, in _read_packet packet.check_error() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\protocol. py", line 220, in check_error err.raise_mysql_exception(self._data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES) ")

django 执行 python manage.py makemagrations ; python manage.py magrate 迁移数据库 报错:已存在对应数据库, 怎么解决?

django 项目是新建的, models类 是通过 python manage.py inspectdb > models 反向生成 的, 现在添加了新的model,迁移的时候出问题了,提示表已存在 。 这种情况如何进行数据库迁移 CSDN是越来越不行了,问了几个问题, 没有一个是有效回答的, 自己摸索出来了, 反向生成Models之后, 执行manage.py magrite, 生成django 自带的表。 之后执行manage.py makemagritions manage.py magrite --fake 执行完以上步骤后 再添加新的Model类 并执行 迁移操作 manage.py makemagritions manege.py magarite 注意这里不是要加 --fake 这样就可以迁移新的数据表了

manage.py运行makemigrations错误。。

manage.py运行makemigrations错误。。 ``` (ll-env) E:\learning_log>python manage.py makemigrations learning_logs Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "E:\learning_log\ll-env\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line utility.execute() File "E:\learning_log\ll-env\lib\site-packages\django\core\management\__init__.py", line 357, in execute django.setup() File "E:\learning_log\ll-env\lib\site-packages\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "E:\learning_log\ll-env\lib\site-packages\django\apps\registry.py", line 114, in populate app_config.import_models() File "E:\learning_log\ll-env\lib\site-packages\django\apps\config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "C:\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 724, in exec_module File "<frozen importlib._bootstrap_external>", line 860, in get_code File "<frozen importlib._bootstrap_external>", line 791, in source_to_code File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "E:\learning_log\learning_logs\models.py", line 3 SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte ```

Django执行python manage.py makemigrations 报错,数据库是postgresql,大神救救孩子

Traceback (most recent call last): File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 220, in ensure_connection self.connect() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 197, in connect self.connection = self.get_new_connection(conn_params) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\postgresql\base.py", line 185, in get_new_connection connection = Database.connect(**conn_params) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\psycopg2\__init__.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line utility.execute() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv self.execute(*args, **cmd_options) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\base.py", line 369, in execute output = self.handle(*args, **options) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\base.py", line 83, in wrapped res = handle_func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\core\management\commands\makemigrations.py", line 101, in handle loader.check_consistent_history(connection) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\migrations\loader.py", line 283, in check_consistent_history applied = recorder.applied_migrations() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\migrations\recorder.py", line 76, in applied_migrations if self.has_table(): File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 260, in cursor return self._cursor() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 236, in _cursor self.ensure_connection() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 220, in ensure_connection self.connect() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 220, in ensure_connection self.connect() File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\base\base.py", line 197, in connect self.connection = self.get_new_connection(conn_params) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\utils\asyncio.py", line 26, in inner return func(*args, **kwargs) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\django\db\backends\postgresql\base.py", line 185, in get_new_connection connection = Database.connect(**conn_params) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\psycopg2\__init__.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError

dango中inspectdb 命令问题

我通过pycharm里边的tools中的Run manage.py Task 中输入 inspectdb命令后,会显在pycharm中示出1个model信息,而不是生成一个新的models.py文件。 如图所示: ![图片说明](https://img-ask.csdn.net/upload/201812/27/1545878003_882066.jpg) 有三个问题: 1.请问接下来的操作 是否是 将 显示出来的model信息,粘贴到model.py文件夹内? 2.通过inspectdb 生成的model信息是不是应该检查一遍它的类型啊,如果和数据库的某个字段的类型不匹配,那在做migrate的时候,会不会把这个表相应的字段给改了? 3.如果执行完 makemigrations 显示 的消息为:如下图 ![图片说明](https://img-ask.csdn.net/upload/201812/27/1545880574_998095.png) 但是 我这个字段有数据,也会把这列全都删除???我认为这样有些危险。 以上请教大神。

求解 我利用Django中的命令:migrate 结果显示找不到此文件

求解 我利用Django中的命令:python manage.py migrate 结果 can't open file 'manage.pymigrate': [Errno 2] No such file or directory 请问如何解决?已经有环境了,在Mac终端运行的

遇到django_content_type' doesn't exist"怎么解决

从git上拉取的项目,使用的DRF框架,执行过python manage.py makemigrations和python manage.py migrate ,迁移一直报错,如下 ![图片说明](https://img-ask.csdn.net/upload/202006/04/1591251614_383666.png) 检查之后发现Django自带的内置表都没有生成,查看django_migrations发现系统自带内置表的迁移文件都是存在的 ![图片说明](https://img-ask.csdn.net/upload/202006/04/1591252022_640001.png) 且通过python manage.py showmigrations可以看到关于django_content_type的迁移文件是执行了的,但是数据库中就是没有这张表,其他表的迁移也会因此报错 ![图片说明](https://img-ask.csdn.net/upload/202006/04/1591252102_446666.png) 查找资料找了一圈的办法,包括删除所有迁移文件新建数据库重新迁移依旧不行,以前从来没有遇到Django系统自带数据表无法生成的情况,现在这种情况完全不知道怎么弄了,请各位大神救救孩子吧!!!

django如何将mysql中表的内容通过models.py在网页端显示

各位朋友们好,mysql数据库中有1张表student包含了name,age两个字段,共1000条数据,现在我想通过django在网页端展示这些数据。看了网上的教程,我在models.py中添加了: from django.db import models import MySQLdb import mysite.settings class student(models.Model): name = models.CharField(max_length = 20) age = models.CharField(max_length = 20) def __str__(self): return self.name 并且在views.py中编写以下代码: # *-* coding: utf-8 *-* import sys reload(sys) sys.setdefaultencoding("utf-8") from django.shortcuts import render, render_to_response from polls.models import student from django.http import HttpResponse import MySQLdb import mysite.settings def index(request): students = student.objects.all() name = "" for stud in students: name = stud.name break return render_to_response('index.html' , {'students':students , 'name':name}) 在settings.py中设置数据库如下: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', #'NAME': os.path.join(BASE_DIR, 'test'),#database name 'NAME': 'test', 'USER':'root', 'PASSWORD':'123456', 'HOST': 'localhost', 'PORT': '3306', } } 在网页端index.html中编写以下内容 ``` <body> <p>学生数据如下:</p> <table border="10"> {% for student in students %} <tr > <td>{{student.name}}</td> <td>{{student.age}}</td> </tr> {% endfor %} </table> </body> ``` 我执行了python manage.py makemigrations 和 python manage.py migrate,虽然也出现了与mysql中表student对应的blog_student表,但是blog_student中没有内容,而且网页端没有数据显示。 请教各位朋友们,这是什么原因呢?该如何显示数据啊? 希望朋友们能指点一下,万分感谢。

python3.6+django2 创建后台管理账号报错 no attribute 'encoding

# AttributeError: '_io.BufferedWriter' object has no attribute 'encoding' ![图片说明](https://img-ask.csdn.net/upload/201811/14/1542186550_856400.jpg) ``` python manage.py makemigrations python manage.py migrate python manage.py createsuperuser ``` ![图片说明](https://img-ask.csdn.net/upload/201811/14/1542186681_307483.jpg) ## 我的后台页面是可以打开的: ![图片说明](https://img-ask.csdn.net/upload/201811/15/1542246566_171055.jpg) ## 后台代码配置如下: ![图片说明](https://img-ask.csdn.net/upload/201811/15/1542246590_797073.jpg) ## 用户创建失败,于是我自己在数据库手动添加了一个用户 ![图片说明](https://img-ask.csdn.net/upload/201811/15/1542246627_362301.jpg) ## 还是不能登录,但是请求200,报错如下 ![图片说明](https://img-ask.csdn.net/upload/201811/15/1542246654_472551.jpg) ## 创建超级管理员还是上面的错误:AttributeError: '_io.BufferedWriter' object has no attribute 'encoding' 请求大神帮忙,感谢!!!

ubuntu19 系统 django连接mysql8.0时为什么会报Access denied错误呢?

ubuntu19 系统下运行 python manage.py makemigrations命令时报错, 错误提示为(1698,Access denied for user root@localhost),使用的是 mysqlclient驱动。 起初以为账号密码错了,然后去mysql登录一下是可以登陆进去的,又去django查看数据库配置,发现都没有问题 ![图片说明](https://img-ask.csdn.net/upload/202005/15/1589523145_428410.png) ![图片说明](https://img-ask.csdn.net/upload/202005/15/1589523166_931825.png) 之后卸载mysqlclient,安装了pymysql又报了另外一个错误:Did you install mysqlclient? 在项目中的__init__.py文件中做了如下配置: import pymysql pymysql.install_as_MySQLdb() 再次运行python manage.py makemigrations,这次提示我mysqlclient的版本(0.9.3)太低(这实际是pymysql的版本,mysqlclient版本为1.4.3),至少需要1.3.3以上

《pythno编程从入门到实践》18.2.2中makemigrations时出错是啥情况

Traceback (most recent call last): File "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "/Users/taoyu/Desktop/learning_log/ll_env/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/Users/taoyu/Desktop/learning_log/ll_env/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute django.setup() File "/Users/taoyu/Desktop/learning_log/ll_env/lib/python3.7/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/taoyu/Desktop/learning_log/ll_env/lib/python3.7/site-packages/django/apps/registry.py", line 112, in populate app_config.import_models() File "/Users/taoyu/Desktop/learning_log/ll_env/lib/python3.7/site-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/Users/taoyu/Desktop/learning_log/learning_logs/models.py", line 5, in <module> class Topics(models.Model): File "/Users/taoyu/Desktop/learning_log/learning_logs/models.py", line 8, in Topics date_added = models.DateTimeField(auto_now_add=Ture) NameError: name 'Ture' is not defined

django.db.utils.OperationalError: disk I/O error

这怎么解决呀? 今天想删除数据库,重新配置以下,结果输入python manage.py makemigrations 后就出现这样的错误

'utf-8' codec can't decode byte 0xb2 in position 0:invalid start byte

新手,在控制台输入python manage.py makemigrations报错: 'utf-8' codec can't decode byte 0xb2 in position 0:invalid start byte。 计算机名称也是英文,问题到底出在哪啊。 ![图片说明](https://img-ask.csdn.net/upload/202003/02/1583130028_283677.png) ![图片说明](https://img-ask.csdn.net/upload/202003/02/1583130177_470346.png) ![图片说明](https://img-ask.csdn.net/upload/202003/02/1583130264_204270.png)

<AttributeError: 'str' object has no attribute 'decode'>,跪求大神解答。

``` from django.db import models # Create your models here. class Grades(models.Model): gname = models.CharField(max_length=20) gdate = models.DateTimeField() ggirlnum = models.IntegerField() gboynum = models.IntegerField() isDelete = models.BooleanField(default=False) class Students(models.Model): sname = models.CharField(max_length=20) sgender = models.BooleanField(default=True) sage = models.IntegerField() scontend = models.CharField(max_length=20) isDelete = models.BooleanField(default=False) # 关联外键 sgrade = models.ForeignKey(Grades, on_delete=models.CASCADE) ``` Django2.2, python3.7, 执行数据库迁移<python manage.py makemigrations>时报错,<AttributeError: 'str' object has no attribute 'decode'>

django自动生成table的问题

环境:python3.5,django1.8.17 我用下面的2个命令,我得model能自动生成数据库对应的表,但是同时也生成了一些其他表,例如:“auth_group”有什么办法不生成这些表吗?如果必须要生成这些表,是不是我可以用他们,也可以不用他们,就给他们放在那里就可以了? python manage.py makemigrations python manage.py migrate

django OperationalError:no such table问题

admin界面有这些table ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566306109_375484.png) 但任何一张表打开都是operationalerror ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566306079_894027.png) 我的数据库 ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566306954_557961.png) 文件路径 ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566307025_838507.png) 运行过如下代码 ``` python manage.py makemigrations python manage.py migrate ``` ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566306389_902239.png) ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566306436_170968.png) 我觉得应该是运行成功了的 以下这些我找到的解决方法都试过了没有用 ``` python manage.py syncdb class Meta: managed = True python manage.py makemigrations HERBS python manage.py migrate HERBS ``` admin.py ``` from django.contrib import admin from HERBS.models import Herbs,DISEASE,Chemicals,CASID,TARGET class HerbAdmin(admin.ModelAdmin): search_fields = ('ID','NAME') #可进行查询的字段 list_filter = ('NAME','Function') #可进行筛选的字段 list_display = ('ID','NAME','Function') #需要在后台显示出来的字段 class DISEASEAdmin(admin.ModelAdmin): search_fields = ('Disease','MolID') list_filter = ('Disease','MolID') list_display = ('Disease','MolID') class ChemicalsAdmin(admin.ModelAdmin): search_fields = ('ChemName','MolID','PubChemcid','ChineseName','Smiles') list_filter = ('MolID','ChemName') list_display = ('ChemName','MolID','PubChemcid','HID','ChineseName','MF','MW','Smiles') class CASIDAdmin(admin.ModelAdmin): search_fields = ('ID','MolID') list_display = ('ID','MolID') class TARGETAdmin(admin.ModelAdmin): search_fields = ('MolID','Target') list_display = ('MolID','Target') # Register your models here. admin.site.register(Herbs,HerbAdmin) admin.site.register(DISEASE,DISEASEAdmin) admin.site.register(CASID,CASIDAdmin) admin.site.register(Chemicals,ChemicalsAdmin) admin.site.register(TARGET,TARGETAdmin) ``` models.py ``` from django.db import models #Create your models here. class Herbs(models.Model): ID = models.DecimalField(max_digits=5,decimal_places=0) NAME = models.TextField(max_length=50,primary_key=True) Function = models.TextField(max_length=500,null=True) class DISEASE(models.Model): Disease = models.TextField(max_length=100) MolID = models.TextField(max_length=50) class Chemicals(models.Model): ChemName = models.TextField(max_length=50) MolID = models.TextField(max_length=50) PubChemcid = models.DecimalField(max_digits=10,decimal_places=0) HID = models.DecimalField(max_digits=10,decimal_places=0) ChineseName = models.TextField(max_length=50) MF = models.TextField(max_length=50) MW = models.DecimalField(max_digits=20,decimal_places=2) Smiles = models.TextField(max_length=500) class CASID(models.Model): ID = models.TextField(max_length=50) MolID = models.TextField(max_length=50) class TARGET(models.Model): Target = models.TextField(max_length=100) MolID = models.TextField(max_length=50) class Meta: managed = True ```

django operationalerror:no such table问题

![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309101_99545.png) 数据库 ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309118_854760.png) 文件路径 ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309159_756269.png) admin界面 ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309201_944852.png) 运行过如下代码并且成功了 ``` python manage.py makemigrations python manage.py migrate ``` ![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309301_942422.png)![图片说明](https://img-ask.csdn.net/upload/201908/20/1566309309_56608.png) 尝试过如下解决方案 ``` python manage.py makemigrations HERBS python manage.py migrate HERBS class Meta: managed = True ``` admin.py ``` from django.contrib import admin from HERBS.models import Herbs,DISEASE,Chemicals,CASID,TARGET class HerbAdmin(admin.ModelAdmin): search_fields = ('ID','NAME') list_filter = ('NAME','Function') list_display = ('ID','NAME','Function') class DISEASEAdmin(admin.ModelAdmin): search_fields = ('Disease','MolID') list_filter = ('Disease','MolID') list_display = ('Disease','MolID') class ChemicalsAdmin(admin.ModelAdmin): search_fields = ('ChemName','MolID','PubChemcid','ChineseName','Smiles') list_filter = ('MolID','ChemName') list_display = ('ChemName','MolID','PubChemcid','HID','ChineseName','MF','MW','Smiles') class CASIDAdmin(admin.ModelAdmin): search_fields = ('ID','MolID') list_display = ('ID','MolID') class TARGETAdmin(admin.ModelAdmin): search_fields = ('MolID','Target') list_display = ('MolID','Target') # Register your models here. admin.site.register(Herbs,HerbAdmin) admin.site.register(DISEASE,DISEASEAdmin) admin.site.register(CASID,CASIDAdmin) admin.site.register(Chemicals,ChemicalsAdmin) admin.site.register(TARGET,TARGETAdmin) ``` models.py ``` from django.db import models #Create your models here. class Herbs(models.Model): ID = models.DecimalField(max_digits=5,decimal_places=0) NAME = models.TextField(max_length=50,primary_key=True) Function = models.TextField(max_length=500,null=True) class DISEASE(models.Model): Disease = models.TextField(max_length=100) MolID = models.TextField(max_length=50) class Chemicals(models.Model): ChemName = models.TextField(max_length=50) MolID = models.TextField(max_length=50) PubChemcid = models.DecimalField(max_digits=10,decimal_places=0) HID = models.DecimalField(max_digits=10,decimal_places=0) ChineseName = models.TextField(max_length=50) MF = models.TextField(max_length=50) MW = models.DecimalField(max_digits=20,decimal_places=2) Smiles = models.TextField(max_length=500) class CASID(models.Model): ID = models.TextField(max_length=50) MolID = models.TextField(max_length=50) class TARGET(models.Model): Target = models.TextField(max_length=100) MolID = models.TextField(max_length=50) class Meta: managed = True ```

django项目 makemigrations时出现nodenotfounderror错误。

如题 makemigrations时出现 django.db.migrations.graph.NodeNotFoundError: Migration blog.0001_initial dependencies reference nonexistent parent node (u'auth', u'0007_alter_validators_add_error_messages')错误 求大家解答! 问题源文件: # -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-24 10:34 from __future__ import unicode_literals import blog.models from django.conf import settings import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('tagging', '0001_initial'), ('auth', '0007_alter_validators_add_error_messages'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('name', models.CharField(max_length=12)), ('avatar_path', models.ImageField(default='/static/image/avatar_default.jpg', upload_to='/avatar')), ], options={ 'abstract': False, 'verbose_name': 'user', 'verbose_name_plural': 'users', }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='Carousel', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('img', models.ImageField(upload_to='/carousel')), ('create_time', models.DateTimeField(auto_now_add=True)), ], options={ 'ordering': ['-create_time'], }, ), migrations.CreateModel( name='Catalogue', fields=[ ('name', models.CharField(max_length=20, primary_key=True, serialize=False)), ], ), migrations.CreateModel( name='Comment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('publish_Time', models.DateTimeField(auto_now_add=True)), ('ip_address', models.GenericIPAddressField()), ('content', models.CharField(max_length=200)), ('isDelete', models.BooleanField(default=False)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Editor', fields=[ ('name', models.CharField(max_length=20, primary_key=True, serialize=False)), ('avaliable', models.BooleanField(default=True)), ], ), migrations.CreateModel( name='Post', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('publish_time', models.DateTimeField(auto_now_add=True)), ('modify_time', models.DateTimeField(auto_now_add=True)), ('content', models.TextField()), ('tag', blog.models.TagField_Mine(blank=True, max_length=255)), ('view_count', models.IntegerField(default=0, editable=False)), ('status', models.SmallIntegerField(choices=[(0, '\u8349\u7a3f'), (1, '\u53d1\u5e03'), (2, '\u5220\u9664')], default=0)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ('catalogue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Catalogue')), ('editor_choice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Editor')), ], options={ 'ordering': ['-modify_time'], }, ), migrations.CreateModel( name='Repository', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('publish_time', models.DateTimeField(auto_now_add=True)), ('author', models.CharField(max_length=20)), ('content', models.TextField()), ('view_count', models.IntegerField(default=0, editable=False)), ('tag', models.ManyToManyField(blank=True, default='', to='tagging.Tag')), ], options={ 'ordering': ['-publish_time'], }, ), migrations.AddField( model_name='comment', name='post', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Post'), ), migrations.AddField( model_name='carousel', name='post', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Post'), ), migrations.AddField( model_name='user', name='editor_choice', field=models.ForeignKey(blank=True, default='tinyMCE', null=True, on_delete=django.db.models.deletion.CASCADE, to='blog.Editor'), ), migrations.AddField( model_name='user', name='groups', field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'), ), migrations.AddField( model_name='user', name='user_permissions', field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'), ), ]

关于mysql-python安装出错

已安装Microsoft Visual C++, 在输入pip install mysql-python后出现以下报错,如何解决![图片说明](https://img-ask.csdn.net/upload/201909/20/1568982476_878784.png)

linux下利用/proc进行进程树的打印

在linux下利用c语言实现的进程树的打印,主要通过/proc下的目录中的进程文件,获取status中的进程信息内容,然后利用递归实现进程树的打印

设计模式(JAVA语言实现)--20种设计模式附带源码

课程亮点: 课程培训详细的笔记以及实例代码,让学员开始掌握设计模式知识点 课程内容: 工厂模式、桥接模式、组合模式、装饰器模式、外观模式、享元模式、原型模型、代理模式、单例模式、适配器模式 策略模式、模板方法模式、观察者模式、迭代器模式、责任链模式、命令模式、备忘录模式、状态模式、访问者模式 课程特色: 笔记设计模式,用笔记串连所有知识点,让学员从一点一滴积累,学习过程无压力 笔记标题采用关键字标识法,帮助学员更加容易记住知识点 笔记以超链接形式让知识点关联起来,形式知识体系 采用先概念后实例再应用方式,知识点深入浅出 提供授课内容笔记作为课后复习以及工作备查工具 部分图表(电脑PC端查看):

Python数据分析与挖掘

92讲视频课+16大项目实战+源码+¥800元课程礼包+讲师社群1V1答疑+社群闭门分享会=99元 &nbsp; 为什么学习数据分析? &nbsp; &nbsp; &nbsp; 人工智能、大数据时代有什么技能是可以运用在各种行业的?数据分析就是。 &nbsp; &nbsp; &nbsp; 从海量数据中获得别人看不见的信息,创业者可以通过数据分析来优化产品,营销人员可以通过数据分析改进营销策略,产品经理可以通过数据分析洞察用户习惯,金融从业者可以通过数据分析规避投资风险,程序员可以通过数据分析进一步挖掘出数据价值,它和编程一样,本质上也是一个工具,通过数据来对现实事物进行分析和识别的能力。不管你从事什么行业,掌握了数据分析能力,往往在其岗位上更有竞争力。 &nbsp;&nbsp; 本课程共包含五大模块: 一、先导篇: 通过分析数据分析师的一天,让学员了解全面了解成为一个数据分析师的所有必修功法,对数据分析师不在迷惑。 &nbsp; 二、基础篇: 围绕Python基础语法介绍、数据预处理、数据可视化以及数据分析与挖掘......这些核心技能模块展开,帮助你快速而全面的掌握和了解成为一个数据分析师的所有必修功法。 &nbsp; 三、数据采集篇: 通过网络爬虫实战解决数据分析的必经之路:数据从何来的问题,讲解常见的爬虫套路并利用三大实战帮助学员扎实数据采集能力,避免没有数据可分析的尴尬。 &nbsp; 四、分析工具篇: 讲解数据分析避不开的科学计算库Numpy、数据分析工具Pandas及常见可视化工具Matplotlib。 &nbsp; 五、算法篇: 算法是数据分析的精华,课程精选10大算法,包括分类、聚类、预测3大类型,每个算法都从原理和案例两个角度学习,让你不仅能用起来,了解原理,还能知道为什么这么做。

广工操作系统课程设计(文档+代码+可执行文件)

实现作业调度(先来先服务)、进程调度功能(时间片轮转) 实现内存管理功能(连续分配)。 实现文件系统功能(选作) 这些功能要有机地连接起来

Only老K说-爬取妹子图片(简单入门)

安装第三方请求库 requests 被网站禁止了访问 原因是我们是Python过来的 重新给一段 可能还是存在用不了,使用网页的 编写代码 上面注意看匹配内容 User-Agent:请求对象 AppleWebKit:请求内核 Chrome浏览器 //请求网页 import requests import re //正则表达式 就是去不规则的网页里面提取有规律的信息 headers = { 'User-Agent':'存放浏览器里面的' } response = requests.get

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

Python代码实现飞机大战

文章目录经典飞机大战一.游戏设定二.我方飞机三.敌方飞机四.发射子弹五.发放补给包六.主模块 经典飞机大战 源代码以及素材资料(图片,音频)可从下面的github中下载: 飞机大战源代码以及素材资料github项目地址链接 ————————————————————————————————————————————————————————— 不知道大家有没有打过飞机,喜不喜欢打飞机。当我第一次接触这个东西的时候,我的内心是被震撼到的。第一次接触打飞机的时候作者本人是身心愉悦的,因为周边的朋友都在打飞机, 每

Python数据清洗实战入门

本次课程主要以真实的电商数据为基础,通过Python详细的介绍了数据分析中的数据清洗阶段各种技巧和方法。

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

apache-jmeter-5.1.1(Requires Java 8+).zip

。Apache JMeter 5.1.1 (Requires Java 8+),需要jdk8以上的版本。

数通HCNP中文理论全套教材.rar

内涵HCNP-IENP中文理论书-内文,

Python可以这样学(第四季:数据分析与科学计算可视化)

董付国老师系列教材《Python程序设计(第2版)》(ISBN:9787302436515)、《Python可以这样学》(ISBN:9787302456469)配套视频,在教材基础上又增加了大量内容,通过实例讲解numpy、scipy、pandas、statistics、matplotlib等标准库和扩展库用法。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

图书管理系统(Java + Mysql)我的第一个完全自己做的实训项目

图书管理系统 Java + MySQL 完整实训代码,MVC三层架构组织,包含所有用到的图片资源以及数据库文件,大三上学期实训,注释很详细,按照阿里巴巴Java编程规范编写

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

C/C++学习指南全套教程

C/C++学习的全套教程,从基本语法,基本原理,到界面开发、网络开发、Linux开发、安全算法,应用尽用。由毕业于清华大学的业内人士执课,为C/C++编程爱好者的教程。

微信公众平台开发入门

本套课程的设计完全是为初学者量身打造,课程内容由浅入深,课程讲解通俗易懂,代码实现简洁清晰。通过本课程的学习,学员能够入门微信公众平台开发,能够胜任企业级的订阅号、服务号、企业号的应用开发工作。 通过本课程的学习,学员能够对微信公众平台有一个清晰的、系统性的认识。例如,公众号是什么,它有什么特点,它能做什么,怎么开发公众号。 其次,通过本课程的学习,学员能够掌握微信公众平台开发的方法、技术和应用实现。例如,开发者文档怎么看,开发环境怎么搭建,基本的消息交互如何实现,常用的方法技巧有哪些,真实应用怎么开发。

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

2021考研数学张宇基础30讲.pdf

张宇:博士,全国著名考研数学辅导专家,教育部“国家精品课程建设骨干教师”,全国畅销书《张宇高等数学18讲》《张宇线性代数9讲》《张宇概率论与数理统计9讲》《张宇考研数学题源探析经典1000题》《张宇考

专为程序员设计的数学课

<p> 限时福利限时福利,<span>15000+程序员的选择!</span> </p> <p> 购课后添加学习助手(微信号:csdn590),按提示消息领取编程大礼包!并获取讲师答疑服务! </p> <p> <br> </p> <p> 套餐中一共包含5门程序员必学的数学课程(共47讲) </p> <p> 课程1:《零基础入门微积分》 </p> <p> 课程2:《数理统计与概率论》 </p> <p> 课程3:《代码学习线性代数》 </p> <p> 课程4:《数据处理的最优化》 </p> <p> 课程5:《马尔可夫随机过程》 </p> <p> <br> </p> <p> 哪些人适合学习这门课程? </p> <p> 1)大学生,平时只学习了数学理论,并未接触如何应用数学解决编程问题; </p> <p> 2)对算法、数据结构掌握程度薄弱的人,数学可以让你更好的理解算法、数据结构原理及应用; </p> <p> 3)看不懂大牛代码设计思想的人,因为所有的程序设计底层逻辑都是数学; </p> <p> 4)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; </p> <p> 5)想修炼更好的编程内功,在遇到问题时可以灵活的应用数学思维解决问题。 </p> <p> <br> </p> <p> 在这门「专为程序员设计的数学课」系列课中,我们保证你能收获到这些:<br> <br> <span> </span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">①价值300元编程课程大礼包</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">②应用数学优化代码的实操方法</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">③数学理论在编程实战中的应用</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">④程序员必学的5大数学知识</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">⑤人工智能领域必修数学课</span> </p> <p> <br> 备注:此课程只讲程序员所需要的数学,即使你数学基础薄弱,也能听懂,只需要初中的数学知识就足矣。<br> <br> 如何听课? </p> <p> 1、登录CSDN学院 APP 在我的课程中进行学习; </p> <p> 2、登录CSDN学院官网。 </p> <p> <br> </p> <p> 购课后如何领取免费赠送的编程大礼包和加入答疑群? </p> <p> 购课后,添加助教微信:<span> csdn590</span>,按提示领取编程大礼包,或观看付费视频的第一节内容扫码进群答疑交流! </p> <p> <img src="https://img-bss.csdn.net/201912251155398753.jpg" alt=""> </p>

DDR5_Draft_Spec_Rev05c.pdf

DDR5 spec

Java面试史上最全的JAVA专业术语面试100问 (前1-50)

前言: 说在前面, 面试题是根据一些朋友去面试提供的,再就是从网上整理了一些。 先更新50道,下一波吧后面的也更出来。 求赞求关注!! 废话也不多说,现在就来看看有哪些面试题 1、面向对象的特点有哪些? 抽象、继承、封装、多态。 2、接口和抽象类有什么联系和区别? 3、重载和重写有什么区别? 4、java有哪些基本数据类型? 5、数组有没有length()方法?String有没有length()方法? 数组没有length()方法,它有length属性。 String有length()方法。 集合求长度用

网络工程师小白入门--【思科CCNA、华为HCNA等网络工程师认证】

本课程适合CCNA或HCNA网络小白同志,高手请绕道,可以直接学习进价课程。通过本预科课程的学习,为学习网络工程师、思科CCNA、华为HCNA这些认证打下坚实的基础! 重要!思科认证2020年2月24日起,已启用新版认证和考试,包括题库都会更新,由于疫情原因,请关注官网和本地考点信息。题库网络上很容易下载到。

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

Python界面版学生管理系统

前不久上传了一个控制台版本的学生管理系统,这个是Python界面版学生管理系统,这个是使用pycharm开发的一个有界面的学生管理系统,基本的增删改查,里面又演示视频和完整代码,有需要的伙伴可以自行下

2019数学建模A题高压油管的压力控制 省一论文即代码

2019数学建模A题高压油管的压力控制省一完整论文即详细C++和Matlab代码,希望对同学们有所帮助

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

相关热词 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行 c# 循环给数组插入数据 c# 多线程死锁的例子 c# 钉钉读取员工排班 c# label 不显示 c#裁剪影像 c#工作进程更新ui
立即提问