Це відео не доступне.
Перепрошуємо.
Django Multiple Database Setup Ex1
- Додати в
- Мій плейлист
- Переглянути пізніше
- Поділитися
Поділитися
Вставка
Розмір відео:
- Опубліковано 19 сер 2024
КОМЕНТАРІ • 124
Наступне
Автоматичне відтворення
Django Transaction AtomicityVery Academy
Переглядів 20 тис.
Intro to Django Tenants - Create a Separate Database Schema for Each UserPretty Printed
Переглядів 16 тис.
How to connect Django Project to Multiple Database Management Systems (Part1/2)KenBroTech
Переглядів 14 тис.
ПОДІЇ НА КУРЩИНІ: ЕКСКЛЮЗИВНИЙ РЕПОРТАЖ НАТАЛІ НАГОРНОЇ З СУДЖІТСН Тиждень
Переглядів 226 тис.
Буданов про плани на Курську область, та Воронеж #shorts #курск #воронежАпостроф TV
Переглядів 2,4 млн
🔥 Уся правда про українську СУДЖУЗе Інтерв'юер
Переглядів 356 тис.
Creating a Custom Database Router | Django Migrations | Shaping Database SchemasVery Academy
Переглядів 1 тис.
How To Create a Python API With FastAPI - Full TutorialTech With Tim
Переглядів 40 тис.
Django - What are migrations - actually? Introduction to migrations and the Django databaseVery Academy
Переглядів 11 тис.
Django & HTMX App - Setup, Models and Management CommandBugBytes
Переглядів 11 тис.
Django Import CSV into ModelVery Academy
Переглядів 57 тис.
django Architecture - Connection ManagementHussein Nasser
Переглядів 45 тис.
How to get Django Tenants up and runningTom's Python and Django
Переглядів 20 тис.
HOW TO CODE DJANGO SERVICES? BUSINESS LOGIC IN DJANGO PYTHONAndrey Ivanov | Python
Переглядів 4,7 тис.
ПОДІЇ НА КУРЩИНІ: ЕКСКЛЮЗИВНИЙ РЕПОРТАЖ НАТАЛІ НАГОРНОЇ З СУДЖІТСН Тиждень
Переглядів 226 тис.
MELLSTROY - первое интервью: как живет самый обсуждаемый стример годаВПИСКА
Переглядів 14 млн
Удар по російській колоні в Курській області #shorts #війна #курськ #арміярфBBC News Україна
Переглядів 827 тис.
РЕЙНДЖЕРС - ДИНАМО. Ліга чемпіонів. ПРЯМА ТРАНСЛЯЦІЯFootball Hub
Переглядів 458 тис.
So brutal REVENGE 😂😭🔥 @BrutalAssaultOFFICIAL #youtube #festival #comedy #metal #corpsepaintcikindeles
Переглядів 8 млн
КУРСЬК, СПИШ? | Упс, а що трапилось #75Aleksey Durnev
Переглядів 781 тис.
Бабцю КИНУЛИ росіяни! Місцеві не знають де її армія РФ. "А кто нас защищает?"Ми - Україна
Переглядів 419 тис.
Державний Прапор України підняли на КУРЩИНІ в рф😍🇺🇦💪🏻 #курськ #прапорукраїни #рф #війна #наступТелеканал Конкурент TV - новини Луцька та Волині
Переглядів 433 тис.
any Django developer that doesn't know this channel is missing something , Thanks for this amazing videos !!
Thanks Azzam 👍
I just subscribed after reading this comment.
Totally agree, this guy is an amazing django developer that I have ever seen
What this channel is missing?
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.
It's my pleasure 👍
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.
Glad it helped!
The best django developer on the planet, damn amazing
This tutorial deserves an applause
It have serve my time from MongoDB errors and with postresql relationship in the Django admin
Thank you sir.
Great!!. I wasn't aware of this until now. Congratulations for such an specialised channel. Definitely the one to go for Django-related content!
Thanks a lot!
Easy to understand and easy to implement. Thank you for the tutorial.
You are welcome!
Thank you so much for tutorial.
Thanks, needed the explanations
Thanks for video... great job! Special for multi tenant architecture
Man... Thank you for this... Keep sharing your Django wisdom...
Thank you for considering my feedback. and waiting for the next video...
👍
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/''
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.
This was very helpful, thank you. I wanted to use Django as an admin micro-service which this has helped me to do.
Amazing content.
Glad you think so!
Just to let you know you are doing a great job! Subscribed!!
Wow! Wonderful material. Thank you so much!
Thank you!
This video is very helpful to me thankyou for making this video😭
Great Tuorial! Keep it up! Thank you 3000 :D
Thank you too!
settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
even after adding 'session' and 'admin'
I have same problem. Did u fix it? :(
You bring really good content. Thank you
Not viewing , but I trust the content!
👍
great video. any more video on this topic ?
Thank You!!!!
👍
Very impressive, can you please release the next episode with foreign key, prefetch_releated, select_related and etc? Thanks, man!
I was just a few hours ago thinking about how to extend this further - thank you.
@@veryacademy 😂😂😂 see we're on same track.
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 .
You are the second person today regarding face recognition... I will get back into ML sooner than later! Thank you - good luck!
Thank you so much for such a perfect tutorial. Is there any chance for a next video on testing with multiple databases?
too good
Would you please make a video about atomic transactions?
Hi Mehran, I will add to the suggestions. Thank you
What it means exactly atomic transactions???
Great content! Slightly different topic, but will you be providing a tutorial on RBAC or have you already?
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.
Awesome!
Can you please make a tutorial about how to provide relationship between multiple database ?
Hello ❤ has you make a second part ?
Not yet!
Great content.
👍
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 ?
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 😁👍
@@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
@@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 👍
@@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 :)
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
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
How to connect multiple legacy databases with tables in the same app? How to do migrations?
Is there a way to manually select models for saving into different databases?
Hey, models in django refers to tables. Are you asking me how to define which model should be saved in which database?
@@veryacademy Yes, sorry for poor english. I tried routers method but it would create all the tables inside my default database.
Hello thanks for this tutorial
Pls help me i use mongodb as second db then i stuck how to write router for mongodb
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.
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?
Don't need self just the _db
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?
Migrate first and change the migration file before makemigrations
Thanks!! I will try to do this
How to use different schemas in a single database in django?
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 ?
How will be manage test cases which uses particular db?
Great question.
docs.djangoproject.com/en/3.2/topics/testing/tools/#multi-database-support
look for Multi-database support
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.
I have User.db in Mysql(database 1) and Product.db in postgres (database 2 ) . How to connecting both database and relationship ?
How can I set FK for multiple database?
Nice vedio! could you please tell how to implement cross database relationships? Any hints?
Django doesn't support relation between different databases so what's the point of using this?
When you have more than one database that doesn't depend on relational support
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
I am looking for the same ... have you found any solution regarding this
@@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!
@@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
@@ganeshniranjan895 not sure what you mean with ‘view of user’. Could you please elaborate?
@@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
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?
Great video, but what's the purpose of having multiple databases rather than tables within one database?
The word is ROUTER not ROOTAR 😂😂 It is so funny
lol Thank you
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 ....
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
Hmm that would be a good tutorial 👍
@@veryacademy 🙏🙏❤️❤️
@@veryacademy This was my question as well, would be awesome if you could create a video about this!!
100th Like
That is like amazing 👍
Can you have foreign keys between the modles living in different databases?
Hi Jakub, if you are referring to FK to FK relationships
stackoverflow.com/questions/29528323/can-a-foreign-key-reference-another-foreign-key/29571740
I am getting module router not found error , can anyone help me !
ModuleNotFoundError: No module names 'routers' - what could be the cause?
Are you following this tutorial only or adding to an existing project
@@veryacademy adding to the existing project
Same error , did your error got solved ?
@aakashmania3784 did you find the solution ?
💃💃💃💃Router
😜
router? I hardly know 'er!
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.
Can I just confirm. You would like to see 2 databases used on one admin site. Is that correct.
@@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.
Thanks for video... great job! Special for multi tenant architecture
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