Giter Site home page Giter Site logo

thixiaoxiao / djongo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doableware/djongo

0.0 0.0 0.0 14.08 MB

Django and MongoDB database connector

Home Page: https://www.djongomapper.com

License: GNU Affero General Public License v3.0

JavaScript 0.01% Python 98.70% CSS 0.02% HTML 1.27% Smarty 0.01% Procfile 0.01%

djongo's Introduction

djongo

Build Status License: AGPL v3 PyPI version

The only connector that lets you use Django with MongoDB without changing the Django ORM

Use MongoDB as a backend database for your Django project, without changing the Django ORM. Use the Django Admin GUI to add and modify documents in MongoDB.

Usage:

  1. Install djongo:
    pip install djongo
    
  2. Into settings.py file of your project, add:
    DATABASES = {
        'default': {
            'ENGINE': 'djongo',
            'NAME': 'your-db-name',
            'CLIENT': {
               'host': 'your-db-host',
            }
        }
    }
  3. Run manage.py makemigrations <app_name> followed by manage.py migrate (ONLY the first time to create collections in mongoDB)
  4. YOUR ARE SET! HAVE FUN!

Requirements:

  1. Python 3.6 or higher.

  2. MongoDB 3.4 or higher.

  3. If your models use nested queries or sub querysets like:

    inner_qs = Blog.objects.filter(name__contains='Ch').values('name')
    entries = Entry.objects.filter(blog__name__in=inner_qs)

    MongoDB 3.6 or higher is required.

How it works

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.

Django contrib modules:

  
'django.contrib.admin',
'django.contrib.auth',    
'django.contrib.sessions',

and others... fully supported.

Features

  • Use Django Admin GUI to access MongoDB.
  • Embedded Model.
  • Embedded Array.
  • Embedded Form Fields.

Read the full documentation

Contribute

If you think djongo is useful, please share it with the world!

You can contribute to the source code or the documentation by creating a simple pull request! You may want to refer to the design documentation to get an idea on how Django MongoDB connector is implemented.

Add a star, show some love :)

Questions and Discussion

  • Djongo groups is where you can watch for new release announcements, suggest improvements, and discuss topics pertaining to Django and MongoDB.
  • Issues, where things are not working as expected, please raise a git-hub issue ticket.
  • For questions and clarifications regarding usage, please put it up on stackoverflow instead.

djongo's People

Contributors

nesdis avatar gregorlulichtec avatar jay20162016 avatar lesantana09 avatar raznak avatar mishrag avatar wolph avatar rudolfce avatar tony13tv avatar finderseyes avatar ravinarayansingh avatar tony avatar tbobm avatar sumanthratna avatar sshishov avatar m1kek1m avatar gomesar avatar frostming avatar lsaavedr avatar lschade avatar mentix02 avatar bykof avatar santhoshkolloju avatar shimulch avatar simonbarendse avatar a-kriya avatar javinp avatar aneesh223 avatar pranay16 avatar tomjohnhall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.