any Django developer that doesn't know this channel is missing something , Thanks for this amazing videos !!
@veryacademy3 жыл бұрын
Thanks Azzam 👍
@KodingTreecom3 жыл бұрын
I just subscribed after reading this comment.
@uweopfern2 жыл бұрын
Totally agree, this guy is an amazing django developer that I have ever seen
@felicytatomaszewska Жыл бұрын
What this channel is missing?
@as-pn9103 жыл бұрын
I am totally blown by the new variety of contents you are coming up with. I am thankful to you for efforts u are taking to make developers like me much skillful.
@veryacademy3 жыл бұрын
It's my pleasure 👍
@uweopfern2 жыл бұрын
The best django developer on the planet, damn amazing
@robertfilson19173 жыл бұрын
I have been struggling with creating multiple databases and importing legacy databases that are read-only. This tutorial really helped me understand how routers work. Thank you very much for that. I will point anybody else who is struggling with it to this video.
@veryacademy3 жыл бұрын
Glad it helped!
@andrewsmichael70473 жыл бұрын
This tutorial deserves an applause It have serve my time from MongoDB errors and with postresql relationship in the Django admin Thank you sir.
@gbrachetta3 жыл бұрын
Great!!. I wasn't aware of this until now. Congratulations for such an specialised channel. Definitely the one to go for Django-related content!
@veryacademy3 жыл бұрын
Thanks a lot!
@vijaypandey97613 жыл бұрын
Easy to understand and easy to implement. Thank you for the tutorial.
@veryacademy3 жыл бұрын
You are welcome!
@SrimalSamarasooriya3 жыл бұрын
Man... Thank you for this... Keep sharing your Django wisdom...
@omarsarmientorolo40652 жыл бұрын
Thanks for video... great job! Special for multi tenant architecture
@Tauseef3 жыл бұрын
Just to let you know you are doing a great job! Subscribed!!
@KrishnaManohar80213 жыл бұрын
Thank you for considering my feedback. and waiting for the next video...
@veryacademy3 жыл бұрын
👍
@EmileNani2 жыл бұрын
This was very helpful, thank you. I wanted to use Django as an admin micro-service which this has helped me to do.
@rahulsaha28593 жыл бұрын
yesterday faced an interview where they asked how you configure different db in django and here I am learnt how, now gonna crack the next. Thanks sir... also I am facing below issue ... ''ConnectionDoesNotExist at /admin/blue/blue/''
@veryacademy3 жыл бұрын
Hi Rahul, well the very best of luck to you, I am sure you will get that job soon enough. Regarding the error, it is one of those it could be a few things, an incorrect name/typo or migrations out of sync or database config issues.
@mrHuangEnglish3 жыл бұрын
Wow! Wonderful material. Thank you so much!
@veryacademy3 жыл бұрын
Thank you!
@mail4upendra3 жыл бұрын
Great Tuorial! Keep it up! Thank you 3000 :D
@veryacademy3 жыл бұрын
Thank you too!
@backendmystery Жыл бұрын
Thanks, needed the explanations
@gopipatwadev3 жыл бұрын
This video is very helpful to me thankyou for making this video😭
@yasayah72893 жыл бұрын
Great content! Slightly different topic, but will you be providing a tutorial on RBAC or have you already?
@alperakbash3 жыл бұрын
Thank you so much for such a perfect tutorial. Is there any chance for a next video on testing with multiple databases?
@divitrao42963 жыл бұрын
You bring really good content. Thank you
@abraaobb Жыл бұрын
Thank you so much for tutorial.
@narmindm2 жыл бұрын
Hi, a very cool lesson!1 Thank you! Can you tell me, please, the django_migrations file is created in all databases, and it is the same, is it possible to avoid this behavior?7 For example, I have an additional step to change the table, but I don't have access to create a new table, what should I do?
@veryacademy2 жыл бұрын
Migrate first and change the migration file before makemigrations
@narmindm2 жыл бұрын
Thanks!! I will try to do this
@djangodeveloper072 жыл бұрын
great video. any more video on this topic ?
@PankajSavaliyaGoogle3 жыл бұрын
Very impressive, can you please release the next episode with foreign key, prefetch_releated, select_related and etc? Thanks, man!
@veryacademy3 жыл бұрын
I was just a few hours ago thinking about how to extend this further - thank you.
@PankajSavaliyaGoogle3 жыл бұрын
@@veryacademy 😂😂😂 see we're on same track.
@gabycarrizal93953 жыл бұрын
maybe a dumb question, is mandatory to create multiple applications in order to use multiple connections? or is more like a good practice? sorry I'm new
@veryacademy3 жыл бұрын
Never a dumb question. There is no mandatory. If I think I understand, make as many apps as you need. Ideally at least to start with stick with 1 database
@jairajsahgal71012 жыл бұрын
Is there a way to manually select models for saving into different databases?
@veryacademy2 жыл бұрын
Hey, models in django refers to tables. Are you asking me how to define which model should be saved in which database?
@jairajsahgal71012 жыл бұрын
@@veryacademy Yes, sorry for poor english. I tried routers method but it would create all the tables inside my default database.
@jorisjansen28923 жыл бұрын
Great tutorial! How would you create relations between models in different databases? Or would you store a reference on a model such as a user_id field, which the user would send with the JWT token, to look for user-specific objects? Cheers
@ganeshniranjan8952 жыл бұрын
I am looking for the same ... have you found any solution regarding this
@jorisjansen28922 жыл бұрын
@@ganeshniranjan895 You should store a reference. It's impossible to have relations between different databases. So storing a user_id or user_uuid would be preferred. Good luck!
@ganeshniranjan8952 жыл бұрын
@@jorisjansen2892 Thank you brother & one last thing i'm using Postgres, so, is it okay if i create the view of user in another db ... will it work ... any suggestions
@jorisjansen28922 жыл бұрын
@@ganeshniranjan895 not sure what you mean with ‘view of user’. Could you please elaborate?
@ganeshniranjan8952 жыл бұрын
@@jorisjansen2892 It is kind of a pseudo-table, these are not real tables take it has a copy of the auth_user table in this case
@oauth97283 жыл бұрын
Not viewing , but I trust the content!
@veryacademy3 жыл бұрын
👍
@mehranj733 жыл бұрын
Would you please make a video about atomic transactions?
@veryacademy3 жыл бұрын
Hi Mehran, I will add to the suggestions. Thank you
@KrishnaManohar80213 жыл бұрын
What it means exactly atomic transactions???
@NeraJima3 жыл бұрын
When creating a custom user model, we must do user.save(using=self._db). Would we do user.save(using=self.users_db) if our custom database's name is users like the case in this video?
@veryacademy3 жыл бұрын
Don't need self just the _db
@MrAntivirus663 жыл бұрын
Hey good sir, first of all i want to thank you for all effort you are putting in :). i am making face recognition + django web app, so i am interested how to connect them, i am beginner, but i hope so i ll figure it out .
@veryacademy3 жыл бұрын
You are the second person today regarding face recognition... I will get back into ML sooner than later! Thank you - good luck!
@harryabc17893 жыл бұрын
Can you please make a tutorial about how to provide relationship between multiple database ?
@natarajanm40363 жыл бұрын
Could you please cover the High availability scenario . Lets say My DB's are hosted in two different Data Centre's . If one of the DB Server is failed the app should run with other DB Server in different DC. And if the failed DB has recovered it should sync with other DB .As soon as it came up.
@LocoARG3 жыл бұрын
Thank You!!!!
@veryacademy3 жыл бұрын
👍
@mosco2252 жыл бұрын
Hello ❤ has you make a second part ?
@veryacademy2 жыл бұрын
Not yet!
@atharvamishra48483 жыл бұрын
settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details. even after adding 'session' and 'admin'
@킥갓3 жыл бұрын
I have same problem. Did u fix it? :(
@vaibhavlodha15603 жыл бұрын
How will be manage test cases which uses particular db?
@veryacademy3 жыл бұрын
Great question. docs.djangoproject.com/en/3.2/topics/testing/tools/#multi-database-support look for Multi-database support
@3DGFan90003 жыл бұрын
not sure whats going on with mine. I have an AuthRouter, and one called DeliveryRouter. When i migrate database=deliveries_db it brings in all of the auth tables as well, and the other way when i migrate users_db. If I do standard migrate it puts tables from my delivery app on the default database. Looks identical to what you demoed.
@jaguarnet3 жыл бұрын
this is unique awesome content, such option drive everyone to think to use django for microservices, if we can split the project in multiple DBs, can we do the same and deploy the Application to multiple servers? if yes this will accomplish the theory of microservice , can we ?
@veryacademy3 жыл бұрын
Hi Fahd, yes Django as the framework within microservices setup/architecture - we can do that. As per normal with any suggestion like this we would find 100 people for and and 100 people against doing so. Some would say this would be counter productive, unnecessarily or complicated. There would be some who would suggest with Django sticking with monolithic and deploy to multiple instances with for example a load balancer and hardware tuning. Who needs to learn microservices when we have serverless 😁👍
@jaguarnet3 жыл бұрын
@@veryacademy May you explain in little details what benefits I will get of being paid member of your channel as I can see all your videos are available along with resources
@veryacademy3 жыл бұрын
@@jaguarnet Hi Fahd, research has revealed that spending money on others actually makes us happier than spending it on ourselves, and giving to others can actually make us healthier! There are no other tangible benefits for you or me subscribing to the members community. I will continue to produce free content. If google should provide more views or if I can gain a larger number of members, the associated financial rewards will enable me to increase the amount, quality and depth of tutorials on this platform. This is a not-for-profit service, all other monies gained will find its way back into producing more content and helping others to access education. I hope that you continue enjoying the content - thank you for your comments 👍
@jaguarnet3 жыл бұрын
@@veryacademy This is awesome from you wishing you very good luck I promise I will subscribe in case if I demanded on your excellent material more and if I were I would slightly change my strategy little and I will share more advanced topics to the paid subscribers and free medium level for the free subscribers whiching you very good luck at anyway :)
@sunagshetty92793 жыл бұрын
Thanks for this valuable information, i have one requirement, in a existing project with default data base configuration, please note data base has many tables, what i have to do to create a new data base for future applications we create in that project. in a nutshell i want a extra data base configuration without altering default case, as data base is filled with many data, please help here.
@hosseintaheri90193 жыл бұрын
thanks sir , is it possible to make relations between tables from different databases ? imagine having two dbs : shop_db and auth_db , I created an app called accounts and defined my custom User that inherits from AbstractUser then I migrated it into auth_db , then I created an app called orders and defined an Order model in it , it has a ForeinKey relation to my custom User model , then I migrated Order into shop_db , but when I try to assign a user to an order in admin I get this error : no such table: main.accounts_user
@veryacademy3 жыл бұрын
Hmm that would be a good tutorial 👍
@hosseintaheri90193 жыл бұрын
@@veryacademy 🙏🙏❤️❤️
@jorisjansen28923 жыл бұрын
@@veryacademy This was my question as well, would be awesome if you could create a video about this!!
@VijayKumar-dq3ph2 жыл бұрын
Nice vedio! could you please tell how to implement cross database relationships? Any hints?
@HDKHKhmer3 жыл бұрын
I have User.db in Mysql(database 1) and Product.db in postgres (database 2 ) . How to connecting both database and relationship ?
@fowad273 жыл бұрын
Great video, but what's the purpose of having multiple databases rather than tables within one database?
@LouisAgyapong3 жыл бұрын
Great content.
@veryacademy3 жыл бұрын
👍
@developers_hub2 жыл бұрын
How can we define relationship between tables in different databases ? Django has no built in support for that, But says can fake the cross connection. How can we achieve this ?
@tamirtsogbayar39123 жыл бұрын
Hello thanks for this tutorial Pls help me i use mongodb as second db then i stuck how to write router for mongodb
@gulzarsingh7162 жыл бұрын
How to connect multiple legacy databases with tables in the same app? How to do migrations?
@Julian-uy9jh3 жыл бұрын
my admin add new object, and clicking on specific object do not work in admin GUI. Deleting an object works though. It says settings.DATABASES is improperly configured. Does anyone know why?
@murishou3 жыл бұрын
Awesome!
@Jakub1989YTb3 жыл бұрын
Can you have foreign keys between the modles living in different databases?
@veryacademy3 жыл бұрын
Hi Jakub, if you are referring to FK to FK relationships stackoverflow.com/questions/29528323/can-a-foreign-key-reference-another-foreign-key/29571740
@dexterfortsilva6656 Жыл бұрын
can you make a new tutorial of this with relations like a user on the first db and bank on the other db and user can add a bank acc based on the second db
@YadavAjay-f6u10 ай бұрын
too good
@rangarajann17812 жыл бұрын
How to use different schemas in a single database in django?
@noblessetech2 жыл бұрын
Django doesn't support relation between different databases so what's the point of using this?
@veryacademy2 жыл бұрын
When you have more than one database that doesn't depend on relational support
@smitpanchal98662 жыл бұрын
How can I set FK for multiple database?
@stringconsultants26453 жыл бұрын
I connected multiple database using multiple djangoApplication but Join is not working ,One particular application model class i try to use same application but another class model getting error (1146, "Table 'coinvest.tbl_positiontest' doesn't exist"). its connect another database i need support any one help me ....
@olb473 жыл бұрын
ModuleNotFoundError: No module names 'routers' - what could be the cause?
@veryacademy3 жыл бұрын
Are you following this tutorial only or adding to an existing project
@olb473 жыл бұрын
@@veryacademy adding to the existing project
@aakashmania2 жыл бұрын
Same error , did your error got solved ?
@SofiaParker777 Жыл бұрын
@aakashmania3784 did you find the solution ?
@aakashmania2 жыл бұрын
I am getting module router not found error , can anyone help me !
@AcademyOmen3 жыл бұрын
💃💃💃💃Router
@veryacademy3 жыл бұрын
😜
@natarajanm40363 жыл бұрын
100th Like
@veryacademy3 жыл бұрын
That is like amazing 👍
@felicytatomaszewska Жыл бұрын
The word is ROUTER not ROOTAR 😂😂 It is so funny
@veryacademy Жыл бұрын
lol Thank you
@kevinzettel2 жыл бұрын
the biggest Issue is the admin isn't hooked up to the two remote databases and using the remote databases table it's using it's local table. as such I think this is pointless which you just did and I'm pretty sure after researching for hours that Django can't support the admin table with multiple databases. either don't use the admin table or don't use multiple databases.
@veryacademy2 жыл бұрын
Can I just confirm. You would like to see 2 databases used on one admin site. Is that correct.
@kevinzettel2 жыл бұрын
@@veryacademy No I found out that you just have to use the "default". one admin DB and one app db and the admin db must be use the default database. something that took me forever to figure out was the admin.model to connect them. figured it out like 3 hours ago and it's actually really nice with optional admin configurations.
@wobblyjellyman693 жыл бұрын
router? I hardly know 'er!
@omarsarmientorolo40652 жыл бұрын
Thanks for video... great job! Special for multi tenant architecture