Created
July 22, 2020 15:25
-
-
Save roosnic1/7eb4ea0ddfc47c476e235f079328caf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALLED_APPS = [ | |
'app.apps.AppConfig', | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment