I'm working on a simple blog engine. Here is my initial code for the models:
from django.db import models
from django.contrib.auth.models import User
class Entry(models.Model):
title = models.CharField(max_length=80)
author = models.models.models.ForeignKey(User)
pubdate = models.DateTimeField()
text = models.TextField()
tags = models.ManyToManyField(Tag)
class Tag(models.Model):
name = models.CharField(max_length=25)
class Comment(models.Model):
author = models.ForeignKey(User)
pubdate = models.DateTimeField()
text = models.TextField()
When I try to run python manage.py syncdb blog, I get the error
'Module' Object Has no Attribute 'models'
I'm using sqlite3. I haven't set up any views or tests yet. In settings.py, I have included the following apps:
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'blogApp',
'south',
Any ideas what could be going wrong here?
django? You could have a name collision for the module name on the PYTHONPATH. Also, is the error on the first or second import?