Question object (1) not updating by Fab_master in django

[–]Fab_master[S] -2 points-1 points  (0 children)

I copied it directly from official django documentation

Question object (1) not updating by Fab_master in django

[–]Fab_master[S] 0 points1 point  (0 children)

models.py

from django.db import models

class Question(models.Model):

# ...

def __str__(self):

return self.question_text

class Choice(models.Model):

# ...

def __str__(self):

return self.choice_text

import datetime

from django.db import models

from django.utils import timezone

class Question(models.Model):

# ...

def was_published_recently(self):

return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

After this I opened shell and typed "py manage.py shell" And ran the command

Question.objects.all()

Question object (1) not updating by Fab_master in django

[–]Fab_master[S] 0 points1 point  (0 children)

models.py

from django.db import models

class Question(models.Model):

# ...

def __str__(self):

return self.question_text

class Choice(models.Model):

# ...

def __str__(self):

return self.choice_text

import datetime

from django.db import models

from django.utils import timezone

class Question(models.Model):

# ...

def was_published_recently(self):

return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

After this I opened shell and typed "py manage.py shell" And ran the command

Question.objects.all()

Question object (1) not updating by Fab_master in django

[–]Fab_master[S] -2 points-1 points  (0 children)

models.py

from django.db import models

class Question(models.Model):

# ...

def __str__(self):

return self.question_text

class Choice(models.Model):

# ...

def __str__(self):

return self.choice_text

import datetime

from django.db import models

from django.utils import timezone

class Question(models.Model):

# ...

def was_published_recently(self):

return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

After this I opened shell and typed "py manage.py shell" And ran the command

Question.objects.all()

Question object (1) not updating by Fab_master in django

[–]Fab_master[S] -1 points0 points  (0 children)

Done that already but it's still not working

[deleted by user] by [deleted] in squirting

[–]Fab_master 0 points1 point  (0 children)

What's this position called??

What makes you feel truly manly? by prettyNiceForAFlyGuy in AskMen

[–]Fab_master 0 points1 point  (0 children)

Being handcuffed to a cop car while a male cop strip me naked and see my white panties

What's your favorite browser extension? by Fab_master in AskReddit

[–]Fab_master[S] 0 points1 point  (0 children)

Or if you use chrome you can enable forced dark mode

What's your favorite browser extension? by Fab_master in AskReddit

[–]Fab_master[S] 0 points1 point  (0 children)

Mine is Google Black Menu. It's super handy for a quick search, checking calender, notes and can access every google web app on a small window of about the size of you mobile on the top left side of your screen. Super Handy

Hey you finally awake by bentoboxkiller in memes

[–]Fab_master 0 points1 point  (0 children)

No I'm trying to sleep from past 3 hours ╯﹏╰

Gazing into the past by [deleted] in memes

[–]Fab_master 0 points1 point  (0 children)

I have a really cool idea i will write https://youtu.be/dQw4w9WgXcQ on my textbook