The server is a virtual Ubuntu machine that I setup today, according to these directions/notes (I made notes where I deviated from the tutorial):
That got the Django "It worked!" page at the server's address on the local network. I then followed the instructions at the official site (I can't post too many links, my reputation is too low), and when I tried to do a ./manage.py syncdb, I get the following error:
CommandError: One or more models did not validate:
zinnia.entry: 'sites' has an m2m relation with model <class 'django.contrib.sites.models.Site'>, which has either not been installed or is abstract.
The Zinnia urls (/weblog/ and /comments/) produce 404 errors that indicate that the Zinnia urls, which are definitely in the project's urls.py, are not making it out of urls.py. I suspect the syncdb error has something to do with this:
Using the URLconf defined in homepage.urls, Django tried these URL patterns, in this order:
^admin/
The current URL, weblog/, didn't match any of these.
To be explicit, starting from a working Django server, I did the following, according to directions (I'm restating the steps I have taken so that it's totally clear):
I'm also a bit confused about the fact that there is no editable python code in the project directory - does Zinnia run completely like a black box? Oh, I also made sure all the requirements were installed, and I pasted the requirements.txt, but the site thought it was code and wouldn't let me post it. Anyways, everything listed on the Zinnia install page is in there.
Make sure you have all of the required installed apps. Note there are a few django.contrib
apps that are required, including django.contrib.sites
, which your error message indicates you missed.
Relevant portion of docs here.
EDIT:
INSTALLED_APPS
requires at least the following:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.sites', # Note this one is not included by default
'django.contrib.comments', # Note this one is not included by default
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'tagging',
'mptt',
'zinnia',
)
Also, you'll likely need to add a SITE_ID
setting.
SITE_ID = 1
Sites framework setup here.
EDIT 2:
Since Django 1.6 django.contrib.comments
is a separated project: django_comments
.
You must install it as in this quick install guide and add 'django_comments'
in INSTALLED_APPS
(not 'django.contrib.comments'
).