Questions tagged [makemigrations]

This is the first step in the two step process to sync changes made to the Django model (in python code) with the database.

https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-makemigrations

113 questions
0
votes
3 answers

Deploying Django app to Heroku

I am a beginner to Python/coding/web development, and am running into and error during deployment process. I coded a matchmaking app using Python/Django. I am attempting to deploy this app using Heroku. I followed all the directions in terms of…
pynewbee
  • 665
  • 3
  • 9
  • 19
0
votes
1 answer

Django makemigrations omits some fields from model

In my django app I've created a model like that: class Plan_miesieczny_aktualny(models.Model): id = models.CharField(max_length=30, primary_key=True) pozycja_planu = models.ForeignKey('Pozycje_planu', to_field='id') miesiac =…
0
votes
1 answer

django makemigrations Failing When Trying to Add ForeignKey to Existing Model

I have a model, and I'm trying to add a foreignkey field to it. This is the field definition: part_of_speech = models.ForeignKey('PartOfSpeech', help_text=_('Translation | part_of_speech | help_text'), verbose_name =…
JayGee
  • 577
  • 6
  • 16
0
votes
1 answer

python django issue with the migrations

Is there any way to deal with the migrations ? I have been working with the version 1.8 of django, where, after doing any change in the models.py, we need to run the following commands - python manage.py makemigrations python manage.py…
vhd
  • 2,008
  • 6
  • 20
  • 21
0
votes
1 answer

Issues with makemigrations and upgrading to Django 1.7

My team had a project running on Django 1.6 with South and we just upgraded to 1.7. I followed the guide, cleared my old South migrations, ran makemigrations and migrate, and ultimately got my server running so I pushed up the changes to our…
Scott
  • 61
  • 6
-1
votes
1 answer

ModuleNotFoundError: No module named 'impassionuser'

I'm using django on vscode, and typed this on terminal: (impassion) Subinui-MacBook-Pro:impassion_community subin$ python3 manage.py makemigrations but can't use makemigrations got this error message ModuleNotFoundError: No module named…
Dpseh
  • 1
  • 2
-1
votes
1 answer

What should I do when migrate in django does not work?

I have a problem with creating models in Django. I want to create new model, so I write code: class Image(models.Model): title = models.CharField(max_length=100) image = models.ImageField() In the next step, I did python manage.py…
Koleole
  • 21
  • 5
-4
votes
2 answers

KeyError: 'DB_NAME' when doing makemigrations in django

I store all my secrets and database params in the dev.env file. I have 3 different settings files - base, dev and prod. There is an SQLite database in base, and I want to connect to Postgres in dev. So I upload my secrets with the environment…
Rikki Tikki Tavi
  • 3,089
  • 5
  • 43
  • 81
1 2 3 4 5 6 7
8