models - importError: No module named django.db -


from django.db import models  # create models here.  def article(models.model):    title=models.charfield(max_length=200)    body=models.textfield()    pub_date=models.datetimefield('date published')    likes=models.integerfield()     def __unicode__(self):       return self.title 

this code using django 1.8.2 within virtual environment

are sure create simple project?

django-admin.py startproject nameofyourproject

mkdir apps

cd apps

django-admin.py startapp nameofyourapp

add in settings in variable "installed apps" new app

nothing should fail...


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -