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
2
votes
1 answer

Error was: No module named django_mongodb_engine.base

I installed and configured a Django/MongoDB like this way ! pip install virtualenv source myproject/bin/activate pip install hg+https://bitbucket.org/wkornewald/django-nonrel pip install hg+https://bitbucket.org/wkornewald/djangotoolbox pip…
timest
  • 188
  • 2
  • 9
2
votes
1 answer

Django contrib.auth.models.User with Django MongoDB Engine

Can you use contrib.auth.models.User or any of contrib.auth along with Django MongoDB Engine? I have MongoDB Engine configured as directed and working fine for custom models but: from django.contrib.auth.models import User a =…
Purrell
  • 12,461
  • 16
  • 58
  • 70
2
votes
2 answers

NotUniqueError using django and mongoengine

I am using django and mongoengine. This is the error I am getting time and again when I try to save a newly created instance using .save() method.I was able to create a model instance first time but after that any post request is raising this…
2
votes
2 answers

SchemaEditor error when trying runserver

I have a MongoDB backend and am running into this error upon python3 manage.py runserver. Traceback (most recent call last): File "hct/.local/lib/python3.4/site-packages/Django-1.8.3-py3.4.egg/django/utils/autoreload.py", line 225, in wrapper …
hct1906
  • 41
  • 6
2
votes
0 answers

"Use 'indexes' instead.", DeprecationWarning)

I practice The Django Book Chapter 10: Advanced Models and have problem I copy these code below in my model.py,and then run python manage.py sqlall books in termial as the website said,but there are errors. Is it because my database is…
user2492364
  • 6,543
  • 22
  • 77
  • 147
2
votes
0 answers

MongoDBManager: raw_query used for filtering

Is there a way to use raw_query to do additional filtering on a returned django.db.models.query.queryset.query? For example: result = MyDocument.objects.raw_query({"foo.bar":{"$regex":"test.*", "$options":"i"}}) Then result_1 =…
jaysonpryde
  • 2,733
  • 11
  • 44
  • 61
2
votes
0 answers

django-mongodb : retrieve an object giving error(s)

I'm using the django_mongo_engine(0.4.0) as backed for django application. an Instructor object is created using like inst = Instructor.objects.create( email=request.POST.get('email').lower(), password =…
navyad
  • 3,752
  • 7
  • 47
  • 88
2
votes
1 answer

"'django_mongodb_engine' isn't an available database backend" when pushing to Heroku

I have a Django app that successfully ran on Heroku and uses mongodb engine. All of a sudden, I can not push it anymore. It does not seem to recognize the django_mongodb_engine module anymore. I even reverted all changes to the version that last…
SimonSays
  • 10,867
  • 7
  • 44
  • 59
2
votes
1 answer

django.core.exceptions.ImproperlyConfigured: name must be an instance of basestring

I am trying to use Mongodb with in my Django. Below there are connection settings in settings.py DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { …
Sakeer
  • 1,885
  • 3
  • 24
  • 43
2
votes
2 answers

How does unique_together work in Django-nonrel?

I am using django-nonrel and django-mongodb engine. In engine's documentation, it says that it supports django's Meta options. I tried using unique_together in a model as such: class Bottler(models.Model): location =…
slow_mondays
  • 871
  • 7
  • 19
2
votes
2 answers

Django + MongoDB on Heroku

I'd like to use Django with MongoDB on Heroku. In the their document, Getting Started with Django on Heroku/Cedar : Postgres Database Config, says that some code is appended to settings.py to use the DATABASE_URL. Is there any way to avoid this ?…
1
vote
1 answer

Uploading Files to GridFS using Django mongodb

I am using django-mongodb for my project.I need to upload images through admin interface and use gridfs file storage for storing images.Django-mongodb has "Django storage backend for GridFS ".I tried this and followed the steps but unable to store…
Anshul
  • 7,914
  • 12
  • 42
  • 65
1
vote
1 answer

InvalidQueryError: Cannot resolve field "point" MongoEngine

I am using below code to fetch nearest location from PointField using MongoEngine restra = ResLocation.objects(point__near=[lat, lon], point__max_distance=distance) all_res = [] for res in restra: all_res += [ …
Naga
  • 1,931
  • 4
  • 25
  • 42
1
vote
2 answers

403 Forbidden and request.method showing GET in django

I am trying to send a form data to an app using AJAX. Javascript part: function submit_changes() { var all_data = [A_list, B_list,C_list] $.ajax({ type: "POST", url: "/my_url/", contentType: "application/json", //dataType: 'json', …
phanny
  • 577
  • 1
  • 6
  • 27
1
vote
1 answer

How to integrate MongoDB in Django1.10 and Python3.5?

I would like to use mongoDB as a database on behalf SQL for my django project. Where in we are developing the apps with django1.10 and python-3.5 version. We installed MongoDB in ubuntu-16.02LTE and thought to use MongoEngine to work with python3.5…