Thanks in advance for your help. Inside mi project I have an app involving models that were generated from an existing database. As those tables are administered by a DBA, they are kept as unmanaged models. As it is possible that we require to…
its just a sample app,
app name:wiki
#models.py
from django.db import models
class Page(models.Model):
name = models.CharField(max_length=20, primary_key=True)
content = models.TextField(blank=True)
#settings.py
INSTALLED_APPS =…
I am using Django 1.7 and django-polymorphic for my models
class ReferenceItem(PolymorphicModel):
created_at = models.DateTimeField(_('date created'), auto_now_add=True, db_index=True)
updated_at = models.DateTimeField(_('date modified'),…
I tried to delete the migrations folder and db.sqlite3 as suggestions but it didn't work. I've also tried to downgrade version of django. Please look at the error below, I think it's the problem with database :
The above exception was the…
I have a Model file which has a change which isn't being picked up by DJango makemigrations.
I created a manual migration following this answer, but if we run makemigrations afterwards Django creates a new auto migration reverting our manual…
This Is My Models :
class Intervention(models.Model):
Titre_intervention = models.TextField(max_length=255)
date_intervention = models.DateField(auto_now_add=True)
type_panne =…
I have a python2.7 django project (I know, I am in 20th century!) that has some models in it. I need to override makemigrations so that the migration filenames are of the form 0001.py, 0002.py and so on, and not like 0001_initial.py, 0002_model1.py…
I am pulling my hair out. I just can't get migrations to work anymore. Every time I run python3 manage.py makemigrations or python3 manage.py makemigrations app_name I get the following error:
Traceback (most recent call last):
File…
Hi there i'm having problems when trying to use the command makemigrations with manage.py.
The output is the following:
Migrations for 'reg':
reg\migrations\0012_auto_20190917_1711.py
- Remove field Products from tenant
- Add field…
I have a rather annoying issue when trying to send my merge to my automated tests on circle CI.
Just for the context, I've inherited a project where the authors are no longer working at my current work.
I'm working on django and I've done a merge,…
I'm making a test project with python and django (for learning purpose). At some point I have to make a django app called products, then in the models.py file in the "products" app directory I have this code:
class Products (models.Model)
title…
I am working on a development server running python3.5 and Django 1.11 with virtualenv
when I use "python manage.py makemigrations" I get this error
Traceback (most recent call last):
File "manage.py", line 8, in
from…
I'm trying to deploy a Django (1.10.6) app to Heroku, runtime Python 3.6.1. The app runs succesfully (except the fact that tables are not created), but when trying run the makemigrations I get the following error:
Running python manage.py…
i guess i'm stuck at a big problem.
i had to delete the migrations directory in my django app and i thought when i run python manage.py makemigrations the directory will be created back, however i got an error…
I'm trying a simple model inheritance:
class Product(models.Model):
creation_date = models.DateTimeField(auto_now_add=True)
class Application(Product):
name = models.CharField(max_length=200)
'makemigrations' asks for a default:
You are…