Creating migrations in Django [closed]

I was following a YouTube video guide on django, and I ran into a problem when after filling out the file models.py I went to cmd and wrote python manage.py makemigrations, but instead of the created file in the migrations directory, I was met with a long error. This is my first experience with django and no migrations have been created before. The code models.py -

` from django.db import models

class Articles (models.Model):
title = models.CharField('Name', max_length=50)
anons = models.CharField('Announcement', max_length=250)
full_text = models.TextField('Article')
date = models.DateTimeField('Publication date')

def __str__(self):
return self.title`

` error -

`C:\Users\глеб\Desktop\pip\books> python manage.py makemigrations
System check identified some issues:

WARNINGS:
?: (staticfiles.W004) The directory 'C:\Users\глеб\Desktop\pip\books\static' in
the STATICFILES_DIRS setting does not exist.
Traceback (most recent call last):
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\utils\module_loading.py", line 30, in import_string
    return cached_import(module_path, class_name)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\utils\module_loading.py", line 16, in cached_import
    return getattr(module, class_name)
AttributeError: module 'django.db.models' has no attribute 'Bi gAutoField'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\models\options.py", line 275, in _get_default_pk_class
    pk_class = import_string(pk_class_path)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\utils\module_loading.py", line 32, in import_string
    raise ImportError(
ImportError: Module "django.db.models" does not define a "Bi gAutoField" attribu
te/class

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\core\management\commands\makemigrations.py", line 158, in handle
    loader.check_consistent_history(connection)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\migrations\loader.py", line 313, in check_consistent_history
    applied = recorder.applied_migrations()
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\migrations\recorder.py", line 81, in applied_migrations
    if self.has_table():
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\migrations\recorder.py", line 59, in has_table
    return self.Migration._meta.db_table in tables
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\utils\functional.py", line 71, in __get__
    return self.fget(cls)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\migrations\recorder.py", line 32, in Migration
    class Migration(models.Model):
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\models\base.py", line 365, in __new__
    new_class._prepare()
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\models\base.py", line 378, in _prepare
    opts._prepare(cls)
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\models\options.py", line 329, in _prepare
    pk_class = self._get_default_pk_class()
  File "C:\Users\глеб\AppData\Local\Programs\Python\Python38-32\lib\site-package
s\django\db\models\options.py", line 281, in _get_default_pk_class
    raise ImproperlyConfigured(msg) from e
django.core.exceptions.ImproperlyConfigured: DEFAULT_AUTO_FIELD refers to the mo
dule 'django.db.models.Bi gAutoField' that could not be imported.

`
I tried many ways from the Internet, but nothing helped. 
Back to Top