I'm fairly new to Python and I am trying to create a website using Python 3.5. When I run the code:
from django.db import models
# Create your models here.
class Topic(models.Model):
text = models.CharField(max_length=200)
date_added = models.DateTimeField(auto_now_add=True)
def __str__(self):
"""Return a string representation of the model"""
return self.text
I get the message:
Traceback (most recent call last):
File "models.py"/ line 1, in (module)
from django.db import models
ImportError: No module named 'django'
I tried installing django in the virtual environment again and got the message:
Requirement already satisfied: Django in c:\users\owner\documents\learning_log\11_env\lib\site-packages
What am I doing wrong?