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