Skip to content

Instantly share code, notes, and snippets.

View jefftriplett's full-sized avatar
Living the dream

Jeff Triplett jefftriplett

Living the dream
View GitHub Profile
import datetime
from django.db import models
class Frob(models.Model):
name = models.CharField(max_length=255)
created = models.DateTimeField(default=datetime.datetime.now)
class Fritz(models.Model):
age = models.IntegerField(default=5)
"""
Copyright (c) 2008-2009, Nathan Borror, and modified heavily by Eric Florenzano
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
; A wrapper to access Tokyo Cabinet from clojure
(ns tokyo-cabinet
; exclude symbols we'll use in our API
(:refer-clojure :exclude [use get]))
(declare *db*)
(defn get [key] (.get *db* key))