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
1
vote
0 answers

python manage.py inspectdb > models.py dont work in existing mongo database

sample_data is the name of the mongo collection. At first, I created a model class named sample_data because I thought it will just read what's already existing in my mongodb but the result was... It creates a new collection named…
1
vote
0 answers

Django models, how to create model which looks like json

I have problem with creating model. I don't know how to make my model looks like json file I made earlier which looks like like below. Is there way in which I can create model based on MongoDB document, or any other that will help me creating this…
1
vote
1 answer

Get Element inside Array With Django-MongoDB (Djongo)

I am using Django with MongoDB as my database. I create a model (MyObject) and one field is an ArrayField type that contains in which entry JSON Fields. For that I created an abstract model. So my models.py: class MyObject(models.Model): ... …
Dariko77
  • 141
  • 1
  • 8
1
vote
0 answers

Django admin form, thows error while set ArrayReference field, Djongo

I'm newbie in Django, I got an error when trying to set ReferenceField to Record This is models: from djongo import models class Record(models.Model): _id = models.ObjectIdField(primary_key=True) text = models.TextField() …
1
vote
2 answers

Djongo not writing the table using manage.py migrate

I am very new at this and am trying to connect my django project with my mongodb using djongo. I've set up mongo atlas and give myself the admin role. to create a new project: django-admin startproject mysite I've created a database with nothing…
llu13701
  • 133
  • 1
  • 12
1
vote
2 answers

MongoDB database. Error "Select a valid choice. That choice is not one of the available choices."

I have installed MongoDB in my Django project. Because is the first time I use Mongo, I decided to try how it works and I created a simple program to store data ( price and quantity in my case). The project is called "exchange" and it has 2 folders:…
zandrones
  • 19
  • 3
1
vote
0 answers

Database Error at BackEnd no Exception message supplied

I am creating a website using Django as BackEnd and MongoDB as my DataBase but I am experiencing an error while trying to add data into my Patient model using the admin dashboard, 1st entry doesn't trigger any exception however when I try to add 2nd…
1
vote
0 answers

Django models save prohibited

I'm new to Django, I'm tring to save an entry on the history model with the code below. This are my models class Actius(models.Model): id = models.ObjectIdField() name = models.CharField(max_length=255) ric =…
ikenas
  • 411
  • 3
  • 11
1
vote
2 answers

How can I query embedded records in a Djongo ArrayField?

I'm using Django 3.0.6 with Django Rest Framework 3.11.1. I'm connecting to a MongoDB database using the djongo connector. One of my models has an ArrayField that contains embedded records. I would like to know how I can retrieve these embedded…
1
vote
3 answers

djongo, unable to connect to remote db on cloud.mongodb.com

i think below setting will work for the djongo to connect to the remote mongodb on mongodb.com but, the error message shows its still trying to connect to the localhost DATABASES = { 'default': { 'ENGINE': 'djongo', 'HOST':…
1
vote
0 answers

Why "models aren't loaded yet" error shows when using embedded models?

I'm trying to connect my django app with mongoDB, I have been using djongo for that. When I create a simple model with no embedded documents the migrations runs perfect but when I try to create a embedded model document in my model the "models…
1
vote
1 answer

Cannot create EmbeddedField in djongo getting this error django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet

hey people I'm new to djongo and was practicing it's usage when i keep getting this error File "D:\python\django Rest webs\tms-REST API\BACKEND\bckend\students\models.py", line 6, in class student(models.Model): File "D:\python\django Rest…
Harshith Yadav
  • 106
  • 1
  • 9
1
vote
0 answers

Not able to connect Django with mongoDb

I am using djongo to connect my mongodb with django. the mongodb i use is atlas service.my password and username are correct even though its showing auth failed. System check identified some issues: sock_info.check_auth(all_credentials) File…
rupekeshan
  • 25
  • 5
1
vote
1 answer

Mongoengine and Pymongo?

Can I use mongoengine or djongo for ODM and pymongo for interaction with the db? I've read these two about something related to my question: Insert data by pymongo using mongoengine ORM in pyramid Use MongoEngine and PyMongo together But, I couldn't…
1
vote
1 answer

Djongo Using ArrayField throws Apps No Loaded Error on makemigrations

I am trying to create a django model using djongo which uses ArrayField class SubModel(models.Model): i = models.IntegerField() class Meta: abstract = True class BiggerModel(models.Model): subarr =…
coderDude
  • 854
  • 8
  • 15