ba da gudummawa.auth
Babu ฦayyadaddun hali don tace %22DO_NOTHING%22 a Django. Wannan na iya haifar da sakamako mara tsammani idan aka yi amfani da su a samfuri ko kallo.
.db.utils.ProgrammingError: %22DO_NOTHING%22 is not defined I'm trying to run a migration in Django, but I get the following error: <code>django.db.utils.ProgrammingError: %22DO_NOTHING%22 is not defined</code> The migration file looks like this: <code># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-18 13:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("myapp", "0004_auto_20170818_1255")] operations = [migrations.AlterField(model_name="mymodel", name="field1", field=models.ForeignKey(null=True, on_delete=models.DO_NOTHING, related_name="+", to="myapp"))] # noqa</code> The model it's referring to looks like this (the field in question is <code>field1</code>) : <code>class MyModel(models.Model): field1 = models.... # other fields here</code> # noqa
Kuskuren yana cewa DO_NOTHING
Ba a fayyace zaษi ba - wannan yana yiwuwa saboda ba a tallafawa a cikin sigar Django da kuke amfani da ita. Don gyara wannan, zaku iya sabunta Django zuwa sabon sigar, ko canza on_delete
zaษi zuwa wani abu dabam wanda aka goyan baya.
Warware Django 'Handler' ba a bayyana shi ba
Wannan kuskuren ya samo asali ne sakamakon ษacewar bayanin shigo da kaya a cikin aikin ku na Django. Kuna iya gyara wannan ta ฦara layin da ke gaba zuwa sashin shigo da aikin ku:
daga django.contrib.auth.models shigo da Mai amfani
Idan kana amfani da ษakin karatu na tantancewa na ษangare na uku, ฦila ka buฦaci ฦara shigo da shi shima.