basic_app not provide the User how to reslove ?

182 views
Skip to first unread message

MEGA NATHAN

unread,
Nov 27, 2019, 11:10:51 PM11/27/19
to Django users
Hi.



PS C:\Users\Meghanathan\Desktop\django\django_levelfive\learning_users> python manage.py migrate basic_app
SystemCheckError: System check identified some issues:

ERRORS:
basic_app.UserProfileInfo.User: (fields.E300) Field defines a relation with model 'User', which is either not installed, or is abstract. 
basic_app.UserProfileInfo.User: (fields.E307) The field basic_app.UserProfileInfo.User was declared with a lazy reference to 'basic_app.user', but app 'basic_app' doesn't provide model 'user'.
PS C:\Users\Meghanathan\Desktop\django\django_levelfive\learning_users>

And i have attached the snipscreen blow .

Regards
Meganathan G,

Screenshot (1).png
Screenshot (2).png
Screenshot (3).png
Screenshot (4).png

Ousseynou Diop

unread,
Nov 28, 2019, 2:08:47 AM11/28/19
to django...@googlegroups.com
Hello friend,
I see the Error :
in line six do this - user = models.OneToOneField(User, on_delete=models.CASCADE)
and in the __str__ function - return self.user.username

Thanks, let us know if this works.

Mailtrack Sender notified by
Mailtrack 11/28/19, 07:05:21 AM

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/164892b0-aaba-4b55-b864-3cdbce1c0f20%40googlegroups.com.


--
Ousseynou Diop
Software developer | Python rock | open source enthusiast 
Portfolio : www.ousseynou.com
Instructor : www.xarala.tech

nikitha malkapuram

unread,
Nov 28, 2019, 6:08:48 AM11/28/19
to django...@googlegroups.com
In models.py in onetoone field remove User from quotes. It is now 'User' make it to User and try once. 

Vignesh Kumar

unread,
Nov 28, 2019, 6:09:13 AM11/28/19
to django...@googlegroups.com
machii nee return panrathu andha model la iruka field tha return pananum.. return self.User

Forrest Hartley

unread,
Nov 28, 2019, 6:09:16 AM11/28/19
to django...@googlegroups.com
You don't have a model called "user".

Reply all
Reply to author
Forward
0 new messages