Re: How to use updated model.py from the shell

2019-03-31 Thread Guru Murthy
You have to update and migrate the file using makemigrations command On Sun, 31 Mar, 2019, 8:16 PM Betty, wrote: > Hi all, > > I am new to django and following tutorials. > > I realized that even if I modified models.py while I was using > shell(python manage.py shell) the modified models.py doe

Re: How to use updated model.py from the shell

2019-03-31 Thread Betty
Oh, thanks! On Monday, April 1, 2019 at 12:07:32 AM UTC+9, Robin Riis wrote: > > Just re import and redeclare the variable? > > from app import model > x = thing.objects.all() > > > Den sön 31 mars 2019 16:46Betty > skrev: > >> Hi all, >> >> I am new to django and following tutorials. >> >> I real

Re: How to use updated model.py from the shell

2019-03-31 Thread Robin Riis
Just re import and redeclare the variable? from app import model x = thing.objects.all() Den sön 31 mars 2019 16:46Betty skrev: > Hi all, > > I am new to django and following tutorials. > > I realized that even if I modified models.py while I was using > shell(python manage.py shell) the modif

How to use updated model.py from the shell

2019-03-31 Thread Betty
Hi all, I am new to django and following tutorials. I realized that even if I modified models.py while I was using shell(python manage.py shell) the modified models.py does not get recognized unless I restart the shell prompt. Is there any other way to load my modified models.py by not restarti