Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 01e6920091
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 14 lines (10 sloc) 0.362 kb
1 2 3 4 5 6 7 8 9 10 11 12 13
# -*- coding: utf-8 -*-
import datetime
from mongoengine import Document, connect
from mongoengine import StringField, DateTimeField

DB_NAME = 'travelmug_example'

class SampleDocument(Document):
    name = StringField(required=True)
    text = StringField(required=True)
    date = DateTimeField(required=True, default=datetime.datetime.now)

connect(DB_NAME)
Something went wrong with that request. Please try again.