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

Running 'makemigrations' in djongo project is raising AppRegistryNotReady

I am using Djongo in django for using mongodb. I tried to migrate the models all the models get migrated but when i need arrayfield. and when i am trying to migrate it. Its rasing error. I tried all things what i was able to find on internet.I tried…
goodwin
  • 49
  • 4
0
votes
1 answer

Table 'login' does not exists in database

I don't know why i am getting this problem now.It was working fine before Note: I use djongo (Mongodb) for database class User(AbstractBaseUser): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) email =…
user12307497
0
votes
1 answer

MongoDB Atlas connection issue with Django

I am trying to connect my Django application with the Atlas MongoDB cloud database using Djongo. The setting file database section is, DATABASES = { 'default': { 'ENGINE': 'djongo', 'NAME': 'mydb', 'HOST':…
0
votes
1 answer

How to use ForeignKey, ManyToManyFields and other fields of Django Relational DB into MongoDB

I am new in Django with MongoDB. Please suggest how to create models using MongoDB with relationship like ForeignKey, ManyToManyFields etc...
Manish Kumar
  • 39
  • 1
  • 8
0
votes
0 answers

Is it possible to have an abstract model inside another abstract model in Django/Djongo?

I'm trying to add a model class with abstract=True in meta to another abstract class.For example, class MainRecord(models.Model): date = models.DateTimeField(auto_now_add=True,null=True) X_data = models.EmbeddedField( …
0
votes
1 answer

Why models.EmbeddedModelField is not working with djongo/django?

I have class Dimension and Feature. ( Want to create an Embedded Model from Feature to Dimension) Documentation: bottom of page I keep getting the error: dimension = models.EmbeddedModel AttributeError: module 'djongo.models' has no attribute …
Lazaron Shyta
  • 67
  • 1
  • 6
0
votes
1 answer

Use mongodb as second database for django app

I'm trying to setup two databases for my django app. The first is used for users and the second for any type of user content. The app is dockerized via docker compose. Here's the docker-compose.yaml file version: '3' services: postgres: …
Zarrie
  • 325
  • 2
  • 16
0
votes
1 answer

How to configure djongo for production with admin account?

I managed to get djongo working in my local computer but when I push it to production, I need to set up an admin account for mongo so that my DB doesnt get hacked (again, sigh). Ive searched for a solution for a couple of days, without success. This…
0
votes
1 answer

Unable to savedata to database in Django using Model and Forms

I trying to to create a database panel for a restaurant app where a user can add, remove, view and create a menu for the restaurant. In this the user can add the name, cuisine, category(veg/non veg) and cost as details of the menu item. Here is my…
0
votes
1 answer

How do I ensure that null fields are not inserted in mongodb collection, from django, using djongo connector?

I'm sharing a dummy code, expecting myself to be as clear as possible. 1. I have a model like this from django.db.models import Model, CharField, IntegerField, DateField class Account(Model): name = CharField(max_length=30, null=False,…
Kiran Racherla
  • 219
  • 3
  • 12
0
votes
0 answers

How to search using regex fast in mongodb using djongo in django

I have a table in DB with almost 20 million records. I want to search through regex. It was all good when the number of records were about 100 thousand. But now it takes like quite a lot time even sometime it results in timeout. Does I need to…
Daud Ahmed
  • 190
  • 1
  • 10
0
votes
0 answers

How to add a data using djongo which do not have any model defined in djongo

I have a json which is not based on any django model but want to store it in mongodb using Djongo. Structure of json is as follow: { name:"test", desc:{ type:1, tags:[2,4,5,5] }, test:["asd","asda"], perform:True }
manikya
  • 21
  • 3
0
votes
1 answer

djongo.sql2mongo.SQLDecodeError: FAILED SQL: Error in django while filtering Data

I am trying to filter my product list with price less than filter but getting error. I guess the error is I am unable to pass parameters correctly. any help would be appreciated. if you require anymore details, please ask. Note: it does not works…
0
votes
0 answers

Is there a django function to pass a object in database to the next redirected page in views in django

I'm developing a project in Django in which I'm using a view(verify) to verify the student's login details. If the student is valid user then it'll redirect to a page(display.html) where all the details of that particular student is displayed. How…
Rithu
  • 1
0
votes
0 answers

Return row number with queryset in Django

I am working with Django and MongoDb with Django. How can I return a query set with row number in it? I have tried to explore aggregation functions of mongo but could not achieve the result. import uuid from django import models class…
antman
  • 317
  • 6
  • 16