当前位置: 首页 > 软件库 > 数据库相关 > >

djongo

Django and MongoDB database connector
授权协议 AGPL-3.0 License
开发语言 Java
所属分类 数据库相关
软件类型 开源软件
地区 不详
投 递 者 终祯
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

djongo

The only connector that let's 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.

Dear Supporter

I am inundated daily with your love, appreciation, queries and feature requests for Djongo. Djongo has grown into more than a simple hobby project of an individual developer. Visit my Patreon page to understand the different levels of support and services you can get.

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! Your endorsements and online reviews will help get more support for this project.

Take a look at the Enhancements project that contains a list of features that must be implemented in future versions of Djongo. 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把mongoDB连接到Django djongo 安装 必须完全按照以下版本安装引用来源 asgiref==3.5.0 Django==4.0.3 djongo==1.3.6 dnspython==2.2.1 pymongo==3.12.1 python-snappy==0.6.1 pytz==2022.1 sqlparse==0.2.4 在您的项目settings.py文件中,

  • 在django学习中,经常看到这两种路由形式 from django.urls import path from django.conf.urls import url django.urls 中的 path() 和 django.conf.urls 中的 url() 都是 Django 中用于 URL 路由的函数,它们的作用是定义 URL 和视图函数之间的映射关系,即当用户访问某个 URL 时,

  • Django中通过request.user获取user信息 自定义账号模型类 # -*- coding: utf-8 -*- from django.db import models from django.utils import timezone from django.contrib.auth.hashers import make_password from django.contrib.

  • 1.在虚拟环境下安装uUWSGI (env_dj) [root@chen1995 MyWebWord]# pip3 install uwsgi 2.在项目的同级目录新建一个script目录,然后新建一个uwsgi.ini文件 (env_dj) [root@chen1995 MyWebWord]# mkdir script # 新建目录 (env_dj) [root@chen1995 MyWeb

  • 此文包含了创建项目及应用的方法,可直接阅读安装django-crontab部分。 创建项目 django-admin startproject testProject(项目名) 创建应用 python3 manage.py startapp TestCrontab(应用名) 安装django-crontab pip3 install django-crontab 编写需要定时执行的函数 def t

  • python django聊天系统 pythondjango对话系统 后端:python django 数据库:MySQL 5.7 前端:html css js等 涉及功能: 登陆、注册、退出、发送信息到对应的人聊天、修改密码、后台管理用户增删改等。 源码下载和功能展示: 链接:https://pan.baidu.com/s/1rDtOKIizLBniaE2HfsZvyA?pwd=jtqm 提取

  • (01)python毕设Django框架校园鲜花水果商城  https://ke.qq.com/course/4231404 (02)python毕设Django框架新闻管理系统      https://ke.qq.com/course/4231967 (03)python毕设Django框架个人博客系统      https://ke.qq.com/course/4232698 (04)pyt

  • django使用Q查询 from django.db.models import Q books = Book.objects.filter(Q(title__icontains=key) | Q(author__icontains=key) | Q(translator

  • Django——创建数据库和表 Django拥有内置的ORM框架(object relational mapping),通过对象操作数据库。 模型是项目的数据来源,其中每一个模型都是一个python类,并且全部继承django.db.models.Model类 定义django.db.models.Model的子类,创建数据库表; 定义表中的字段,类里面的属性; 类中的方法就是对数据库进行数据的增