problems running manage.py makemigrations in a Django REST project [closed]

1

I am starting to use django rest following a tutorial in which the app is a catalog of series.

First I confirm the model in the models.py file:

from django.db import models

class Serie(models.Model):

    HORROR = 'horror'
    COMEDY = 'comedy'
    ACTION = 'action'
    DRAMA = 'drama'

    CATEGORIES_CHOICES = (
        (HORROR, 'Horror'),
        (COMEDY, 'Comedy'),
        (ACTION, 'Action'),
        (DRAMA, 'Drama'),
    )

    name = models.CharField(max_length=100)
    release_date = models.DateField()
    rating = models.IntegerField(default=0)
    category = models.CharField(max_length=10, choices=CATEGORIES_CHOICES)

Following the steps of the tutorial ... I proceed to do the migration of the model:

manage.py makemigrations

and when executing it by console ... it throws me this error:

Traceback (most recent call last):
  File "F:\WORK\Angular Proyecto\tutorial\webflix\manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\site-packages\django\core\management\__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\site-packages\django\core\management\__init__.py", line 337, in execute
    django.setup()
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\site-packages\django\__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\site-packages\django\apps\registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\site-packages\django\apps\config.py", line 94, in create
    module = import_module(entry)
  File "C:\Users\P3DRUK0\Envs\evpy3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'series'

I have investigated and I have not found the solution to the problem ... some help would be good ...

thanks in advance ..

    
asked by Peter Paul 06.09.2017 в 16:52
source

1 answer

0

in search of solution .. and to leave doubts ... I went back to execute the tutorial step by step and this see if the command was executed correctly:

manage.py makemigrations

try to be as thorough as possible ... it seems it was a problem of copying thanks

    
answered by 07.09.2017 в 17:15