I am Stuck on one part of the Django poll tut I need help


When I do the python manage.py shell
cmd it comes up with a bunch of things.
I dont know what to do after this please help

Welcome @ArabHabib !

Please show the complete contents of your polls\models.py file.

Also, please do not post images of code, or output. Copy/paste the actual text into the body of your post.

When posting code here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.

Here is my polls\models.py code

‘’’
from django.db import models

class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField(“date published”)

class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
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)
‘’’

I need help ASAP as this is for a school project

You have multiple definitions for your Question and Choice model. There should only be one of each in your models.py file.

Also, when marking off your code, you need to use three backtick - ` characters, not the apostrophe- \’ character.

So what do i need to do to fix it?

Reread the tutorial steps regarding the edits to those classes.

Ok I will try this thank you