Hello,
I tried to apply migrations for a new model. The model was used in a form
used in the admin so the migrations failed.
He is a sample code i wrote which gave me the same errors.
models.py
from django.db import models
class App(models.Model):
name = models.CharField(max_length=50)
forms.py
from django import forms
from app.models import App
class AppForm(forms.ModelForm):
name = ((elem.id, elem.name ) for elem in App.objects.all())
admin.py
from django.contrib import admin
from app.forms import AppForm
from app.models import App
class AppAdmin(admin.ModelAdmin):
search_fields = ('id', 'name')
form = AppForm
list_display = ('id', 'name')
admin.site.register(App, AppAdmin)
After running ./manage.py makemigrations i got this error
django.db.utils.OperationalError: no such table: app_app
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/1e16f8da-3875-434c-b669-64d3febfd02e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.