Questions tagged [djongo]

For usage with the djongo backend driver for MongoDB with the Django framework

Djongo allows you to use MongoDB as the database back end with the Django framework.

The project can be found on GitHub:

https://github.com/nesdis/djongo

274 questions
3
votes
3 answers

Django cant connect to mongoDB atlas

Recently I started a project to make a Webserver using a Django backend with and a mongoDB database hosted on their Atlas platform so i don't have to worry about running it locally. Im still in the early stages of setting it up and encountered the…
Max Karsten
  • 73
  • 1
  • 6
3
votes
0 answers

facing error in django admin inline with djongo db connector

I'm using the ArrayReferenceField instead of ManyToManyField because I'm using djongo as my database connector. I want this field to be shown as inline model in the django admin site. But I'm getting the error AttributeError:…
3
votes
0 answers

Mongodb error in Django using Djongo : pymongo.errors.OperationFailure: unsupported type in filter

I am trying to connect a Django project to a MongoDB cluster and when running: py manage.py runserver or py manange.py migrate It keeps showing the same error : Watching for file changes with StatReloader Performing system checks... System check…
3
votes
2 answers

Djongo not obtaining Object Array embedded fields correctly with Django-rest-framework

I am having trouble displaying the codes array as an embedded field on Django. I am connecting Django up to a MongoDB where there are embedded documents. (See below) Adding the fields in Django Administration works fine. (See…
Luke Phillips
  • 3,372
  • 1
  • 11
  • 15
3
votes
3 answers

Djongo redefine the structure of ArrayModelField

I am defining ArrayModelField using Djongo. It looks great, but the problem with ArrayModelField is I can only add it as Array of Objects, not just Flat List. Is there any way by which I can add it as Flat List? Example: # models.py from djongo…
bharadhwaj
  • 2,059
  • 22
  • 35
3
votes
2 answers

Integrate djongo (Mongo ORM) into Django Rest Framework

Actually I am developping a POC on which we want an app which has a REST API and discuss with MongoDB in Python. For this we found several techs, such as Django-rest-framework for the API side and djongo for the ORM side. Nevertheless, I scan lots…
2
votes
1 answer

How to list all values associated with all foreign keys in djongo

I am using djongo as database connector for mongoDB. I created two models called MailGroup and User. Every User is associated with a MailGroup. Each MailGroup can have multiple users. Now, I want to fetch all mailgroups and users in the following…
2
votes
0 answers

Error connecting Django with MongoDB using Djongo

I am building a simple web app using django as my backend and mongodb as a database. I have set up the settings.py file correctly like so: Image of my settings.py ​ The error i get when i try to migrate my data to database: Error Traceback (most…
dzoni_K
  • 21
  • 2
2
votes
1 answer

Djongo Error: Keyword: FAILED SQL: SELECT %(0)s AS "a" FROM "testapp_test_db" WHERE "testapp_test_db"."id" = %(1)s LIMIT 1 Params: (1, 1)

I have created two models in Django. The one is Test_DB and the other is ForeignKey_Test. The later models has a foreign key field which is referring to the Test_DB. When I tried to enter data from the the Django's default admin panel, I got the…
2
votes
1 answer

ERROR while ingegrating MongoDB with Django on windows

I am trying to integrate MongoDB and Django. but when i run the code python manage.py runmigrations app_name i am getting the error: File "C:\Users\Gourav\Envs\test\lib\site-packages\django\db\utils.py", line 126, in load_backend raise…
def __init__
  • 1,092
  • 6
  • 17
2
votes
1 answer

How to return a file from django API which was saved in a mongodb?

I am struggeling to return a file e.g. a pdf which was uploaded to a mongodb. I am able to upload a file to the database but I am not able to retrieve the file again. How shoud my endpoint (view) look like to return the file? I am using django rest…
Anti
  • 101
  • 5
2
votes
0 answers

Djongo - trying to create a list field

I'm trying to explore Django and djgono for fun. I want to create a document in the db which is similar to the following document: { "title": "Djongo - trying to create a list field", "body": "I cannot do basic programming...epic fail!", …
nabil.adnan1610
  • 424
  • 3
  • 10
2
votes
1 answer

Djongo fails to query BooleanField

I have Django application with a module like this: class myApp(models.Model): is_new = models.BooleanField(default=True) more_fields = models.TextField(blank=True) And using Djongo for database (which is mongodb) I can query all fields in…
Fahad Alduraibi
  • 372
  • 6
  • 17
2
votes
1 answer

Djongo fails to migrate contenttypes migrations

I am using djongo for MongoDB connection in my project. I have cleaned all previous migrations, deleted the sqlite database and made migrations for the app again. Here are all the migrations that need to be run python3 manage.py…
2
votes
0 answers

django.db.utils.DatabaseError with Django and Djongo

I keep running into the django.db.utils.DatabaseError error with trying to migrate the database changes in a Django project. Terminal Output: Running migrations: Not implemented alter command for SQL ALTER TABLE "project_name_user" ALTER COLUMN…
Rashiq
  • 317
  • 1
  • 4
  • 13
1
2
3
18 19