Skip to content

Instantly share code, notes, and snippets.

View dtanham's full-sized avatar

Dan Tanham dtanham

View GitHub Profile
@ielshareef
ielshareef / site_id_djangononrel_mongodb.md.md
Created June 25, 2012 04:13
Error on Django-nonrel and MongoDB: AutoField (default primary key) values must be strings representing an ObjectId on MongoDB (got u'1' instead). Please make sure your SITE_ID contains a valid ObjectId string.

Fixing SITE_ID for Django-nonrel and MongoDB

by Ismail Elshareef

Django's database setting are by default set to work with relational databases. Therefore, certain issues start popping up when you work with noSQL databases, like MongoDB.

Problem

If you're running Django-nonrel with Mongodb, you will run into an issue when you execute the following command: