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
0 answers

python syntax error on manage.py makemigrations

When I start python3 manage.py makemigration from Django for everybody course lab Week 5 Django Features and Libraries I get this error: (django3) 12:01 ~/django_projects/mysite $ python3 manage.py makemigrations …
0
votes
2 answers

Migrations in DJango

I am having DJango migrations problem while making migration following error is coming. When I run my applications using python manage.py runserver it shows this :- However, running python manage.py makemigrations shows no changes detected And…
0
votes
1 answer

Unable to makemigrations in Django

Problem statement: I am trying to create a new model in a new file - app1/models/model2.py I dont see any error when I try to makemigrations. But Django doesnt detect any changes. If I put the same code in my previous file app1/models/model1.py -…
Aseem
  • 5,848
  • 7
  • 45
  • 69
0
votes
0 answers

Migrate two different models from two different Django applications

Hi guys so i have a Django project with two application named, shopper, parcel, each of this app have one model also named Parcel and Shopper. there is a one-to-many relationship between the 2 models. the problem is i want to migrate the two models,…
user15317824
  • 370
  • 6
  • 15
0
votes
1 answer

django.db.utils.OperationalError: no such table: store_product

When I run makemigrations error is occurred. Here is models.py def unique_order_id(): not_unique = True while not_unique: uo_id = random.randint(1000000000, 9999999999) if not Order.objects.filter(order_id=uo_id): …
Rubel
  • 1,255
  • 14
  • 18
0
votes
1 answer

Django/Python feeding back ImproperlyConfigured for makemigrations for AppConfiguring

Following along a tutorial and I have been able to solve all my little issues so far until I get to my back-end creating my own 'app' for data I can lookup with SQlite. My work flow: > DJANGO-WEBSITE: > capstone_project_website: > settings.py >…
RDeaver
  • 81
  • 1
  • 3
0
votes
1 answer

No installed app with label 'emp' Django and what i dont understand is that i did put the app in the installed apps

No installed app with label 'emp' Django and what i dont understand is that i did put the app in the installed apps this is the insstalled apps part
0
votes
1 answer

Initial migrations after cloning repo - "related model cannot be resolved"

I'm working with a few people on an app. I'm doing front end. Recently, I've messed up migrations. After trying to fix them for a few hours, I've dropped all tables, and cloned the repo again. Since there are no migrations files, I run manage.py…
aurelia
  • 493
  • 8
  • 12
0
votes
1 answer

Django makemigration error No module named 'qrcode.settings'

I am trying to set up a new project on my windows 10 64 bit pc While doing python manage.py makemigrations I keep getting ModuleNotFoundError: No module named 'qrcode.settings' I have installed all the dependencies successfully, running the cmd in…
Zubair Khan
  • 11
  • 1
  • 4
0
votes
0 answers

Django Admin MakeMigrations Error - ROOT_URLCONF is not configured

I'm having this error when I trying to push django-admin makemigrations from cmd in my project folder. I can not find the exact problem in other topics. I'm quite sure that I'm doing well till here. I really appreciate your helps in advance. There…
user11028617
0
votes
2 answers

Getting errors while trying to run manage.py migrate

When I run makemigrations there's no problem at all. But when trying to run migrate, the below error occurs. django.db.utils.IntegrityError: The row in table 'main_tutorial' with primary key '1' has an invalid foreign key:…
Mubin_Hardy
  • 53
  • 1
  • 9
0
votes
0 answers

I have a long error message when writing "python manage.py makemigrations" saying invalid syntax

1**. I am following Mosh' tutorial on (youtube https://www.youtube.com/watch?v=_uQrJ0TkZlc)- at the part where we get to the DB SQLite part, it sayd this long message when writing "Python manage.py makemigrations": (venv)…
Tom Ziv
  • 19
  • 5
0
votes
2 answers

Django makemigrations tool fails if i change the foreign key / other relationships at models

I have a problem with Djang makemigrations / migrate tool I have a Withdraw model with foreignkey to an Employee table. Everything is working fine models.py from django.contrib.auth.models import User class Withdraw(models.Model): …
0
votes
0 answers

Creating a datatable using makemigrations and migrate in Django

models.py from django.db import models class Students(models.Model): name=models.CharField(max_length=64), rollNo=models.IntegerField(), marks=models.IntegerField(), friends=models.CharField(max_length=64) After applying these…
0
votes
1 answer

Issue in django 1.7.2 version while doing makemigrations

when created new model and executing makemigrations in django 1.7.2 version django.core.exceptions.FieldError: Local field u'id' in class 'PhotoFeatureImage' clashes with field of similar name from base class 'PhotoFeature'