0

I want to do CRUD app with authorization using DJango and MongoDB without using ORM. How can I implement this in my project and do it with some buttons on my page?

Now im using DJongo but i wont using ORM.

I have no idea how to do it.

For example - after click button you will add or delete something to database without using ORM.

pawroz
  • 15
  • 1
  • 6
  • how do you expect to read object without ORM ? like executing MongoDB queries directly ? `SELECT * FROM model` ?? and why do you want to do that – seif Mar 23 '21 at 21:09
  • I found some exercise like this, yes something like this ```SELECT * FROM model``` but for mongoDB something like this ```db.bios.findOne( { }, { name: 1, contribs: 1 } )``` – pawroz Mar 24 '21 at 10:53
  • i am not an expert in mongoDB but you can do `model.objects.all().query()` and it will give you the query that have been executed and Install PyMongo and use it ... still i don't know why you don't want use the defauld django query set – seif Mar 24 '21 at 11:13
  • this is a way to get the query [https://docs.djangoproject.com/en/3.1/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running](https://docs.djangoproject.com/en/3.1/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running) ||| this alsow might help[https://stackoverflow.com/questions/1074212/how-can-i-see-the-raw-sql-queries-django-is-running](https://stackoverflow.com/questions/1074212/how-can-i-see-the-raw-sql-queries-django-is-running) – seif Mar 24 '21 at 11:17
  • you can use queries directly (high speed without orm) , use pymongo , this link help you https://pymongo.readthedocs.io/en/stable/tutorial.html – milad_vayani May 10 '21 at 05:55

0 Answers0