Questions tagged [django-mongodb-engine]

Django MongoDB Engine is a MongoDB database backend for Django.

Django MongoDB Engine is a database backend adding support for MongoDB to the Django web framework.

85 questions
1
vote
0 answers

Catching exception if a db exists but collection does not using django-mongodb

I am using django-mongodb engine for a django app that have multiple databases. Lets say I have a model named as Profiles. For selecting model values from correct db, I query it liked Profiles.objects.using(db_name). There are two cases for catching…
Dania
  • 1,007
  • 1
  • 14
  • 21
1
vote
0 answers

Using GeoJson data format how can we write dynamic query for "properties dictionary fields "?

I have data in geojson format. Here is my data : { "type" : "FeatureCollection", "features" : [ { "type" : "Feature", "properties" : { "year" : 2015, "season" : "rabbi", …
1
vote
1 answer

How to manage roles and permission in Django Rest framework mongoengine

I am building a Restapi using Django and Rest framework and mongoengine, so far all requests require a user to be authenticated and check against a token. But now I need to allow different actions to different users. I don't know where to begin.…
elhoucine
  • 2,356
  • 4
  • 21
  • 37
1
vote
0 answers

Conflict between MongoDB-engine and Django Rest Framework

My RESTful web service uses djangorestframework for RESTful web services, while I need to use mongodbengine to connect to MongoDB. The problem is that they both have conflicting sets of requirements. While djangorestframework requires Django 1.7+,…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
1
vote
1 answer

pip install django-mongodb-engine Error: "Command "python setup.py egg_info" failed with error code 1"

i hope someone here can help me cause iam really struggling with this for about 12 hours+. I try to use Django with MongoDb Using the following Instruction for the packages…
1
vote
1 answer

How to use lookup operator icontains in raw query of django mongodb engine?

I am using django-mongodb-engine Here, I used MongoDBManager to use a raw query. class NameInfo(models.Model) first_name = models.CharField(max_length=50) class Abc(models.Model): name = EmbeddedModelField('NameInfo') objects =…
1
vote
1 answer

configuration of django_mongodb_engine with django 1.8 or any other way to use MongoDB

I have configure django_mongodb_engine with django 1.6 version but i am not able to configure it with 1.8 version. I have used steps given on this site https://django-mongodb-engine.readthedocs.org/en/latest/topics/setup.html
Bhautik Patel
  • 31
  • 1
  • 1
  • 5
1
vote
0 answers

adding metadata fields in gridfs using django mongodb engine in django

How do I add fields in the metadata of gridfs along with the default fields? Using the following code in models.py class Event(models.Model): name = models.CharField(max_length=10*1024*1024) details = models.TextField() image =…
kaushikdr
  • 1,699
  • 2
  • 12
  • 18
1
vote
1 answer

Django-nonrel + MongoDB error while running tests

I have a setup inside a virtual environment: Django-nonrel-1.6 mongodb-engine djangotoolbox Everything works fine, the only problem is during running tests. Every time django tries to flush database after running a test function it throws an…
lehins
  • 9,642
  • 2
  • 35
  • 49
1
vote
4 answers

Difference among Mongoengine, flask-MongoEngine and Django-MongoEngine?

What are the differences between the Mongoengine, flask-MongoEngine and Django-MongoEngine projects? I am using Mongoengine in my Django project. Will I get any benefits if I use Django-MongoEngine instead?
1
vote
0 answers

How to define reference field in model

I just installed the Django MongoDB Engine as explained here and would like to define a ReferenceField in my model like people did here using mongoengine. However I can't fine how to define a document reference field using mongoDB-engine. I already…
Dominik Neise
  • 1,179
  • 1
  • 10
  • 23
1
vote
2 answers

Django non-rel connecting to multiple hosts in a replica set

I'm using django non-rel with mongodb backend. The docs are clear on how to connect to a single host, however I would like to connect to all hosts in a replica set. Is it possible to do so? How would the the DATABASES element in settings.py look…
odedfos
  • 4,491
  • 3
  • 30
  • 42
1
vote
1 answer

NoReverseMatch at /admin/auth/user using mongoDB engine causes inability to edit auth.users

I'm using django-nonrel version 15.5, and djangotoolbox. I have a problem with adding users in the admin-ui that are not a super-users: When entering the Auth segment -> Users -> Add User -> I input a name and a password and press save-> I get the…
nitzanwe
  • 412
  • 5
  • 17
1
vote
1 answer

initial_data for django running with MongoDB

After much hardship, I have managed to convert my django project, that previously ran with sqlite, to run with MongoDB. This is great, beside from the fact that my old version had a massive initial_data.json file, which now fails to work with the…
nitzanwe
  • 412
  • 5
  • 17
1
vote
1 answer

Can't import name LOOK_SEP while implementing django-mongodb-engine

Here is what I have done so far, 1) I installed Django, and started a project using: django-admin.py startproject helloworld 2) I downloaded django non-rel, djangotoolbox and django-mongodb-engine I installed these using sudo python setup.py…
Praveen
  • 2,400
  • 3
  • 23
  • 30