Skip to content

Commit

Permalink
Merge from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier de Régis committed Jan 11, 2019
2 parents 0ec2e04 + cc6c7d6 commit 4ca3c4d
Show file tree
Hide file tree
Showing 2,117 changed files with 198,372 additions and 1,696 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ minimal-mistakes
!docs/_includes/nav_list
!docs/_layouts/single.html


/tests/dummy_app/dummy/migrations
/tests/dummy_app/djongo-test
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: python

python:
- "3.6"

install:
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.0.tgz
- tar xzf mongodb-linux-x86_64-4.0.0.tgz
- ${PWD}/mongodb-linux-x86_64-4.0.0/bin/mongod --version
- pip install tox

before_script:
- mkdir ${PWD}/mongodb-linux-x86_64-4.0.0/data
- ${PWD}/mongodb-linux-x86_64-4.0.0/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-4.0.0/data --logpath ${PWD}/mongodb-linux-x86_64-4.0.0/mongodb.log --fork

script:
- tox -e django_dev

after_script:
- pkill mongod
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<h1>djongo</h1>

[![Build Status](https://travis-ci.com/nesdis/djongo.svg?branch=master)](https://travis-ci.com/nesdis/djongo)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
<a href="https://badge.fury.io/py/djongo"><img src="https://badge.fury.io/py/djongo.svg" alt="PyPI version" height="18"></a>

<h2>Driver for allowing Django to use MongoDB as the database backend</h2>
## 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.

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Use MongoDB as a backend database for your Django project, without changing the

[![Djongo Support](/djongo/assets/images/support.png)](https://www.patreon.com/nesdis/)

I am inundated daily with your appreciation, queries and feature requests for Djongo. Djongo has grown into more than a simple hobby project of an individual developer. To sustain this effort, I have decided to follow an organized approach.
I am inundated daily with your appreciation, queries and feature requests for Djongo. Djongo has grown into more than a simple hobby project of an individual developer. To support the requests, I have decided to follow an organized approach.

Visit my [Patreon page](https://www.patreon.com/nesdis/) to understand the different levels of support and to make requests.
Visit my [Patreon page](https://www.patreon.com/nesdis/) to make requests and for support.

## Sustainable Development

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ header:
overlay_image: /assets/images/landing-banner3.jpg

punchline:
- excerpt: Use MongoDB with Django, by adding just one line of code.
- excerpt: The only connector that let's you use Django with MongoDB *without* changing the Django ORM.

feature_row:

Expand Down Expand Up @@ -47,4 +47,4 @@ addendum_row1:

{% include feature_row %}

{% include feature_row id="addendum_row1" type="center" %}
{% include feature_row id="addendum_row1" type="center" %}
3 changes: 3 additions & 0 deletions tests/django_tests/tests/admin_changelist/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import uuid

from django.db import models


Expand Down Expand Up @@ -73,6 +75,7 @@ class Invitation(models.Model):


class Swallow(models.Model):
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4)
origin = models.CharField(max_length=255)
load = models.FloatField()
speed = models.FloatField()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import datetime

from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.auth.models import User
from django.test import RequestFactory, TestCase
from django.utils.timezone import make_aware

Expand All @@ -11,9 +12,14 @@
class DateHierarchyTests(TestCase):
factory = RequestFactory()

@classmethod
def setUpTestData(cls):
cls.superuser = User.objects.create_superuser(username='super', email='[email protected]', password='xxx')

def assertDateParams(self, query, expected_from_date, expected_to_date):
query = {'date__%s' % field: val for field, val in query.items()}
request = self.factory.get('/', query)
request.user = self.superuser
changelist = EventAdmin(Event, custom_site).get_changelist_instance(request)
_, _, lookup_params, _ = changelist.get_filters(request)
self.assertEqual(lookup_params['date__gte'], expected_from_date)
Expand Down
Loading

0 comments on commit 4ca3c4d

Please sign in to comment.