You almost had it! You're already setting DJANGO_SETTINGS_MODULE before you call django.setup() inside your main function. However, you also call django.setup() on line 4. You need to set DJANGO_SETTINGS_MODULE before the first django.setup().
On Wednesday, 25 September 2019 13:04:10 UTC+2, Sahil Sharma wrote:
-- On Wednesday, 25 September 2019 13:04:10 UTC+2, Sahil Sharma wrote:
So I was adding data into the user model that is create using faker library but i am facing certain errormy populatescript screenshot is insertedhere is my user model classfrom django.db import models# Create your models here.class user(models.Model):firstname=models.CharField(max_length =250,unique=False)lastname=models.CharField(max_length =250,unique=False)emailid=models.CharField(max_length =500,unique=True)def __str__(self):return self.emailid
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3ec98288-706a-4038-8e24-3dba76e83c67%40googlegroups.com.
No comments:
Post a Comment