Re: Django query returns nothing for legacy databse

2016-06-10 Thread Galil
@Gagaro, thanks! That worked for me! @Remco Gerlich, no I don't have a database router as what I am doing now is very simple But thank you for you answer anyway! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

Re: Django query returns nothing for legacy databse

2016-06-09 Thread Remco Gerlich
Do you have a database router set up to tell Django which models are stored in which database? Greetings, Remco Gerlich On Thu, Jun 9, 2016 at 2:13 PM, Galil wrote: > Hello, > > I am using two databses for my Django app and one of them is an existing > MySQL database: > > DATABASES = { > 'defa

Re: Django query returns nothing for legacy databse

2016-06-09 Thread Gagaro
Hi, You should select the database you want to use: Calls.objects.using('calls').all() See https://docs.djangoproject.com/en/1.9/topics/db/multi-db/#manually-selecting-a-database On Thursday, 9 June 2016 14:13:22 UTC+2, Galil wrote: > > Hello, > > I am using two databses for my Django app and

Django query returns nothing for legacy databse

2016-06-09 Thread Galil
Hello, I am using two databses for my Django app and one of them is an existing MySQL database: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'users.sqlite3'), }, 'calls': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'portal2', 'USE