Skip to content

Commit 30761f9

Browse files
author
christofer holm
committed
Merge commit '27b68eff27f127fc1c4126d3d0b8be88fc87f060'
2 parents a8423a4 + 27b68ef commit 30761f9

File tree

4,342 files changed

+1071
-429540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,342 files changed

+1071
-429540
lines changed

pkg/MANIFEST.in

-4
This file was deleted.

pkg/README.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Use Mongodb as a backend database for your django project, without changing a
2+
single django model!
3+
4+
Usage
5+
-----
6+
7+
1. Install djongo::
8+
9+
pip install djongo
10+
11+
2. Into settings.py file of your project, add::
12+
13+
DATABASES = {
14+
'default': {
15+
'ENGINE': 'djongo',
16+
'NAME': 'your-db-name',
17+
}
18+
}
19+
20+
3. Run (ONLY the first time to create collections in mongoDB)::
21+
22+
manage.py makemigrations
23+
manage.py migrate
24+
25+
YOUR ARE SET! HAVE FUN!
26+
27+
Requirements
28+
------------
29+
30+
1. Djongo requires python 3.6 or above.
31+
32+
33+
How it works
34+
------------
35+
36+
Djongo is a SQL to mongodb query transpiler. It translates a SQL query string
37+
into a mongoDB query document. As a result, all Django features, models etc
38+
work as is.
39+
40+
Django contrib modules::
41+
42+
'django.contrib.admin',
43+
'django.contrib.auth',
44+
'django.contrib.sessions',
45+
46+
and others... fully supported.
47+
48+
Important links
49+
---------------
50+
51+
* `Full Documentation <https://www.djongomapper.com/>`_
52+
* `Source code <https://github.com/doableware/djongo>`_

pkg/djongo/__init__.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
# This version of Djongo was made possible by
2-
# the generous contributions from:
3-
#
4-
# * Zachary Sizemore
5-
# * Wayne Van Son
6-
# * Norman Niemer
7-
# * Renz Ladia
8-
# * thestick613
91

10-
__version__ = '1.3.6'
2+
__version__ = '1.3.7'

pkg/djongo/introspection.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import collections
22
import datetime
3-
43
import bson
54
from django.db.backends.base.introspection import BaseDatabaseIntrospection, FieldInfo, TableInfo
65
from django.db.models import Index
6+
from logging import getLogger
7+
8+
logger = getLogger(__name__)
79

810

911
class DatabaseIntrospection(BaseDatabaseIntrospection):
@@ -41,7 +43,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
4143
# return sorted(cursor.m_cli_connection.collection_names(False))
4244

4345
def get_table_list(self, cursor):
44-
46+
logger.debug(f'Introspection list table names')
4547
return [
4648
TableInfo(c, 't')
4749
for c in cursor.db_conn.list_collection_names()

pkg/pyproject.toml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools"]
4+
5+
[project]
6+
dynamic = ["version", "optional-dependencies"]
7+
name = "djongo"
8+
dependencies = [
9+
'sqlparse==0.2.4',
10+
'pymongo>=3.7.0,<=3.11.4',
11+
'django>=2.1,<=3.1.12',
12+
'pytz>=2018.5'
13+
]
14+
authors = [
15+
{ name = "doableware", email = 'support@doableware.com' }
16+
]
17+
license= {text = "AGPL"}
18+
keywords = ["Django", "Djongo", "MongoDB", "driver", "connector"]
19+
requires-python = ">=3.6"
20+
classifiers = [
21+
'Development Status :: 3 - Alpha',
22+
'Intended Audience :: Developers',
23+
'License :: OSI Approved :: BSD License',
24+
'Programming Language :: Python :: 3.6',
25+
]
26+
description = "Djongo: The Django MongoDB connector"
27+
readme = "README.md"
28+
[project.urls]
29+
Homepage = "https://www.djongomapper.com/"
30+
Documentation = "https://www.djongomapper.com/docs/"
31+
Repository = "https://github.com/doableware/djongo.git"
32+
33+
[tool.setuptools.dynamic]
34+
version = {attr = "djongo.__version__"}

pkg/setup.cfg

-2
This file was deleted.

pkg/setup.py

-120
This file was deleted.

pkg/tests/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.json

pkg/tests/django_tests/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/

0 commit comments

Comments
 (0)