Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion source/includes/interact-data/specify-a-query.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __str__(self):
# end-filter-relationships

# start-filter-combine
Movie.objects.filter(awards__text__istartswith="nominated")
Movie.objects.filter(
(Q(title__startswith="Funny") | Q(title__startswith="Laugh"))
& ~Q(genres__contains=["Comedy"]))
# end-filter-combine

# start-sort
Expand All @@ -71,6 +73,10 @@ def __str__(self):
Movie.objects.filter(genres=["Crime", "Comedy"]).first()
# end-first

# start-array
Movie.objects.filter(genres__overlap=["Adventure", "Family"])
# end-array

# start-json
Movie.objects.filter(imdb__votes__gt=900000)
# end-json
Expand Down
11 changes: 5 additions & 6 deletions source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ Django MongoDB Backend

.. toctree::

Interact with Data </interact-data>
Issues & Help </issues-and-help>
Compatibility </compatibility>


.. TODO:
Get Started </get-started>
Connection Configuration </connect>
Interact with Data </interact-data>
Model Your Data </model-data>
Django Feature Limitations </feature-limitations>
API Documentation <{+api+}>
Expand All @@ -43,11 +42,11 @@ a Django database backend that uses PyMongo to connect to MongoDB.
.. Learn how to configure a connection to a MongoDB deployment
in the :ref:`django-connection-configuration` section.

.. Interact with Data
.. ------------------
Interact with Data
------------------

.. Learn how to use {+django-odm+} to perform operations on MongoDB data
in the :ref:`django-interact-data` section.
Learn how to use {+django-odm+} to perform operations on MongoDB data
in the :ref:`django-interact-data` section.

.. Model Your Data
.. ---------------
Expand Down
17 changes: 17 additions & 0 deletions source/interact-data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _django-interact-data:

==================
Interact with Data
==================

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: odm, crud, query

.. toctree::
:caption: Interact with Data

Specify a Query </interact-data/specify-a-query>
Loading
Loading