Skip to content

Instantly share code, notes, and snippets.

View pathtrk's full-sized avatar

Ryosuke Goto pathtrk

View GitHub Profile
var express = require('express'),
wine = require('./routes/wines');
var app = express();
app.configure(function () {
app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */
app.use(express.bodyParser());
});
@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: