Re: CreateView for non default database

2023-08-09 Thread ivan harold
Did you try what David Nugent suggested? Did it worked? On Thursday, July 27, 2023 at 6:31:33 PM UTC+8 David Nugent wrote: > Database Router is the trick for this. Django calls this function to > determine which database the transaction will use based on the type of > operation requested, so y

Re: CreateView for non default database

2023-07-27 Thread David Nugent
Database Router is the trick for this. Django calls this function to determine which database the transaction will use based on the type of operation requested, so you can separate which database is selected for reads, writes and migrations. Regards, David On Wed, Jul 26, 2023 at 1:11 PM Muhammad

Re: CreateView for non default database

2023-07-26 Thread Sebastian Jung
Hello , I found this tutorial: https://dboostme.medium.com/using-django-with-multiple-databases-introduction-8f0ffb409995 But i self don't use several databases Regards Muhammad Juwaini Abdul Rahman schrieb am Mi., 26. Juli 2023, 05:11: > Hi all, > > I have two different databases as below:

CreateView for non default database

2023-07-25 Thread Muhammad Juwaini Abdul Rahman
Hi all, I have two different databases as below: DATABASES = { 'tvet': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', }, 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'jpk', 'USER': 'jpkuser', 'PASSWORD': 'jpkpassword', 'HOST': 'localhost', # Or an IP Addr