So you want to use

DJANGO AND
MONGODB
     @flaper87
DJANGO AND
      MONGODB
  THAT’S COOL, but you need
to know A COUPLE OF THINGS
LIKE: WHAT ARE
THE OPTIONS?
( http://mongoengine.org )

  An object-document mapper
to connect Python and MongoDB
Mongokit
      ( http://namlook.github.com/mongokit/ )

          Another ODM
that takes mongodb into the web
OR, OF COURSE
DJANGO
MONGODB
ENGINE
(A MongoDB backend for Django)
DJANGO-NONREL
A good and up to date Django fork
   that brings non-rel support
Sadly, some of your


django.contrib.*
may be broken, but not the admin
erm...
erm... OKAY
 WHAT’S SO COOL
ABOUT THIS THEN?
WHAT’S SO COOL
ABOUT THIS THEN?
 No changes needed.
ABOUT THIS THEN?
 No changes needed.

 NOBODY’S GONNA TOUCH
 YOUR PRECIOUS BUILTINS.
NOBODY’S GONNA TOUCH
   YOUR PRECIOUS BUILTINS.

REDUCED IMPEDANCE MISSMATCH
That’s cool

WHAT ELSE?
NEW FIELDS
AGGREGATIONS
GRIDFS
CACHING
MAP / REDUCE
>>> for pair in Article.objects.map_reduce(_map, _reduce, 'wordcount'):
...     print pair.key, pair.value
NEW INDEXES
class Club(models.Model):
   location = ListField()
   rating = models.FloatField()
   ...
   class MongoMeta:
       indexes = [
          [('rating', -1)],
          {'fields': [('location', '2d')], 'min': -42, 'max': 42},
       ]
Plus:

TONS OF DOCS
  (which never hurts)
Suggestions
RAW QUERIES
MyModel.objects.raw_query(field=“value”)
EMBEDD IF
       POSSIBLE
class Comment(models.Model):
    created_on = models.DateTimeField()
    author = EmbeddedModelField('Author')
    text = models.TextField()
RE-THINK
  YOUR MODELS
class Post(models.Model):
    title = models.CharField()
    text = models.TextField()
    tags = ListField()

    # Note: Use defer
    comments = ListField(EmbeddedModelField('Comment'))
DO NOT USE IT
      EVERYWHERE
MONGODB_MANAGED_APPS = ['myapp']

MONGODB_MANAGED_MODELS = ['myapp.MongoDBModel']
SERVE STATIC
    FILES
GridFSStorage + nginx-GridFS
AGGREGATIONS?
       MAP/REDUCE
class Min(MongoAggregate):
    initial_value = float('inf')
    reduce_template = '{alias} = ({lookup}<{alias})?{lookup}:{alias}'

class Max(MongoAggregate):
    initial_value = float('-inf')
    reduce_template = '{alias} = ({lookup}>{alias})?{lookup}:{alias}'
DATES WORK
           But, MongoDB
does not support month/day queries
DO NOT TRY
TO MIGRATE
It Wont Work!
CONTRIBUTE
The Compiler’s a mess
Ask away
  http://groups.google.com
/group/django-non-relational


   Contribute:
http://django-mongodb.org
  /meta/contributing.html

More Related Content

PPT
Django and Mongoengine
ODP
Django with MongoDB using MongoEngine
PDF
The Django Book - Chapter 5: Models
KEY
Making Django and NoSQL Play Nice
PPTX
Tango with django
ODP
Django tech-talk
PPTX
JS basics
Django and Mongoengine
Django with MongoDB using MongoEngine
The Django Book - Chapter 5: Models
Making Django and NoSQL Play Nice
Tango with django
Django tech-talk
JS basics

What's hot (20)

KEY
Introduction to Django
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
ODP
* DJANGO - The Python Framework - Low Kian Seong, Developer
PPTX
Web development with django - Basics Presentation
PDF
Django Overview
PDF
A Basic Django Introduction
PPTX
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
PDF
React.js触ってみた 吉澤和香奈
PPTX
Java Script
PDF
Django Introduction & Tutorial
PPT
jQuery introduction
PPTX
Django Framework Overview forNon-Python Developers
PDF
Create responsive websites with Django, REST and AngularJS
PPTX
Introduction to java_script
PPT
Java script programs
PPTX
Java script
ODP
Introduction to Django
PPTX
The Django Web Application Framework 2
PPT
ODP
Django for Beginners
Introduction to Django
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
* DJANGO - The Python Framework - Low Kian Seong, Developer
Web development with django - Basics Presentation
Django Overview
A Basic Django Introduction
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
React.js触ってみた 吉澤和香奈
Java Script
Django Introduction & Tutorial
jQuery introduction
Django Framework Overview forNon-Python Developers
Create responsive websites with Django, REST and AngularJS
Introduction to java_script
Java script programs
Java script
Introduction to Django
The Django Web Application Framework 2
Django for Beginners

Similar to Django Mongodb Engine (20)

PDF
Django mongodb -djangoday_
PDF
Intro to Backbone.js with Rails
PPT
Mongo-Drupal
ODP
This upload requires better support for ODP format
PDF
How to use MongoDB with CakePHP
PPTX
Grzegorz Witek - MongoDB + RoR, Mongoid (PRUG 1.0)
PDF
PyConUK2013 - Validated documents on MongoDB with Ming
PPTX
PyGrunn 2017 - Django Performance Unchained - slides
PDF
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
PDF
NoSQL into E-Commerce: lessons learned
PDF
Data Migrations in the App Engine Datastore
PDF
MongoDB
KEY
MongoDB at ZPUGDC
PDF
MongoDB and Ruby on Rails
PDF
Building spatial back ends with Node.js and MongoDB
PDF
Tdd is not about testing
PDF
MongoDB at FrozenRails
PPT
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
PPT
MongoDB Pros and Cons
PDF
MongoDB and Node.js
Django mongodb -djangoday_
Intro to Backbone.js with Rails
Mongo-Drupal
This upload requires better support for ODP format
How to use MongoDB with CakePHP
Grzegorz Witek - MongoDB + RoR, Mongoid (PRUG 1.0)
PyConUK2013 - Validated documents on MongoDB with Ming
PyGrunn 2017 - Django Performance Unchained - slides
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
NoSQL into E-Commerce: lessons learned
Data Migrations in the App Engine Datastore
MongoDB
MongoDB at ZPUGDC
MongoDB and Ruby on Rails
Building spatial back ends with Node.js and MongoDB
Tdd is not about testing
MongoDB at FrozenRails
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
MongoDB Pros and Cons
MongoDB and Node.js

More from Flavio Percoco Premoli (8)

PDF
Marconi: Queuing and Notification service for OpenStack
PDF
OpenStack: A python based IaaS provider
PDF
Glance wants to go public
PDF
Introduction, deployment and hybrid clouds
PDF
OpenStack: Community driven development, For Real!
PDF
Mongodb in deep
PDF
When?, Why? and What? of MongoDB
Marconi: Queuing and Notification service for OpenStack
OpenStack: A python based IaaS provider
Glance wants to go public
Introduction, deployment and hybrid clouds
OpenStack: Community driven development, For Real!
Mongodb in deep
When?, Why? and What? of MongoDB

Recently uploaded (20)

PPTX
maintenance powerrpoint for adaprive and preventive
PPTX
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
PPT
Overviiew on Intellectual property right
PDF
Altius execution marketplace concept.pdf
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
Human Computer Interaction Miterm Lesson
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
Slides World Game (s) Great Redesign Eco Economic Epochs.pdf
PPTX
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
PDF
Applying Agentic AI in Enterprise Automation
PDF
Fitaura: AI & Machine Learning Powered Fitness Tracker
PDF
Advancements in abstractive text summarization: a deep learning approach
PDF
Intravenous drug administration application for pediatric patients via augmen...
PDF
Child-friendly e-learning for artificial intelligence education in Indonesia:...
PPTX
CRM(Customer Relationship Managmnet) Presentation
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PPTX
Blending method and technology for hydrogen.pptx
PDF
Optimizing bioinformatics applications: a novel approach with human protein d...
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
maintenance powerrpoint for adaprive and preventive
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
Overviiew on Intellectual property right
Altius execution marketplace concept.pdf
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Human Computer Interaction Miterm Lesson
Presentation - Principles of Instructional Design.pptx
Slides World Game (s) Great Redesign Eco Economic Epochs.pdf
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
Applying Agentic AI in Enterprise Automation
Fitaura: AI & Machine Learning Powered Fitness Tracker
Advancements in abstractive text summarization: a deep learning approach
Intravenous drug administration application for pediatric patients via augmen...
Child-friendly e-learning for artificial intelligence education in Indonesia:...
CRM(Customer Relationship Managmnet) Presentation
Report in SIP_Distance_Learning_Technology_Impact.pptx
Blending method and technology for hydrogen.pptx
Optimizing bioinformatics applications: a novel approach with human protein d...
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .

Django Mongodb Engine