Error at OneToOneField in models while creating new models class

2018-09-22 Thread Srinivas Gadi
HI All, I am facing below error while creating a new model class. the error pop up only at this line "user = models.OneToOneField(User)" *"E1120:No value for argument 'on_delete' in constructor call"* from django.db import models from django.contrib.auth.models import User class userProfile(mode

Re: Error at OneToOneField in models while creating new models class

2018-09-22 Thread Srinivas Gadi
Adding more and complete details: I am facing below error while creating a new model class. the error pops up only at this line "user = models.OneToOneField(User)" *"E1120:No value for argument 'on_delete' in constructor call"* section/models.py from django.db import modelsfrom django.contrib.aut

Re: Error at OneToOneField in models while creating new models class

2018-09-22 Thread Matthew Pava
Did you try running your migrations? Get Outlook for Android On Sat, Sep 22, 2018 at 5:07 AM -0500, "Srinivas Gadi" mailto:srini@gmail.com>> wrote: Adding more and complete details: I am facing below error while creating a new model class. the error pops up only at

Re: Error at OneToOneField in models while creating new models class

2018-09-22 Thread Srinivas Gadi
Yes, provided the migrations out put in the second mail On Sat, 22 Sep 2018, 17:11 Matthew Pava, wrote: > Did you try running your migrations? > > Get Outlook for Android > > > > > On Sat, Sep 22, 2018 at 5:07 AM -0500, "Srinivas Gadi" < > srini@gmail.com> wrote: > >

Re: Error at OneToOneField in models while creating new models class

2018-09-23 Thread Adolfo Cueto
First you have to change your model name Class names starts with uppercase... My friend.. you are not making migrations... look at you have to do this: 1. Delete your migration folder 2. Delete you app table manually (DROP table) 3. python manage.py makemigrations app_name 4. migrate that's al

Re: Error at OneToOneField in models while creating new models class

2018-09-24 Thread Srinivas Gadi
Thank you for the response, 1. Deleted the migrations folder 2. Removed the SQLite3 DB itself 3. My dir structure. 24-09-2018 16:37 . 24-09-2018 16:37 .. 23-09-2018 15:06 college 19-09-2018 08:56 554 manage.py 19-09-2018 10:59

Re: Error at OneToOneField in models while creating new models class

2018-09-26 Thread luca bocchi
seems that your app is not in settings.INSTALLED_APPS, add 'section' there and retry. L Il giorno lunedì 24 settembre 2018 13:22:48 UTC+2, Srinivas Gadi ha scritto: > > Thank you for the response, > 1. Deleted the migrations folder > 2. Removed the SQLite3 DB itself > 3. My dir structure. > > 24

Re: Error at OneToOneField in models while creating new models class

2018-09-26 Thread Srinivas Gadi
It was fixed by adding the "section.apps.Class.Config" in settings INSTALLED_APPS On Thu, Sep 27, 2018 at 5:05 AM luca bocchi wrote: > seems that your app is not in settings.INSTALLED_APPS, add 'section' there > and retry. > > L > > Il giorno lunedì 24 settembre 2018 13:22:48 UTC+2, Srinivas Gad