Changes between Version 24 and Version 25 of NoSqlSupport


Ignore:
Timestamp:
Dec 7, 2017, 10:14:23 PM (6 years ago)
Author:
nesdis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NoSqlSupport

    v24 v25  
    77</div>
    88}}}
     9
     10= Django + Mongodb = Djongo =
     11
     12[https://github.com/nesdis/djongo Djongo] is specifically meant for connecting the **original** Django ORM (instead of a non-rel flavor) to MongoDB. Using the Django `admin` app one can add and modify documents in MongoDB. Other `contrib` modules such as `auth` and `sessions` also work without any changes.
     13
     14 Usage:: Connecting Django to MongoDB is similar to any other DB (like Postgresql or OracleDB)
     15
     16
     17        1. `pip install djongo`
     18        2. Into settings.py file of your project, add:
     19
     20        {{{
     21        #!python
     22       
     23        DATABASES = {
     24                'default': {
     25                        'ENGINE': 'djongo',
     26                        'NAME': 'your-db-name',
     27                }
     28        }
     29
     30}}}
     31
     32
     33        3. Run `manage.py makemigrations` followed by `manage.py migrate`
     34
     35
     36 Working:: Djongo is a SQL to MongoDB query compiler. It translates a SQL query string into a MongoDB query document. As a result, all Django features, models, etc., work as is. For more information checkout [https://github.com/nesdis/djongo Djongo documentation] and a discussion on [https://nesdis.github.io/djongo/integrating-django-with-mongodb/ Integrating Django with MongoDB]
     37
     38 = Django-nonrel =
    939
    1040The [http://django-nonrel.org/ Django-nonrel] branch of Django already provides support for NoSQL and it requires only minimal changes to Django's ORM. However, for the more interesting features like `select_related()` Django's ORM needs to be refactored and simplified in several areas. Many of the sections in this page are described from the point of view of Django-nonrel since a lot of experience required for official NoSQL support has been integrated in the Django-nonrel project.
     
    2050
    2151Also take a look at the [http://djangopackages.com/grids/g/nosql/ feature comparison matrix] for an overview of what is supported and what is missing. Database-specific features are sometimes provided by an automatically added manager. For example, MongoDB adds a manager which adds map-reduce and other MongoDB-specific features.
    22 
    23 [https://github.com/nesdis/djongo Djongo]: Efforts to connect the original Django ORM (instead of a non-rel flavor) to MongoDB are also being made. Currently all Django contrib modules (Eg: Auth, Session, etc,.) work fine with MongoDB. In addition, the Django Admin module works fine with MongoDB as well. Embedded documents or Array of embedded documents can be written into MongoDB using the Django Admin webapp.
    2452
    2553= Representing result rows =
Back to Top