Re: how to test an application that's using a legacy database

2014-11-12 Thread David Palao
2014-11-12 0:25 GMT+01:00 Carl Meyer : > Hi David, > > On 11/11/2014 08:37 AM, dpalao.pyt...@gmail.com wrote: >> Dear Carl, >> >> Thank you for the answer. >> >> On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote: >> >> Hi David, >> >> On 11/11/2014 07:01 AM, dpalao...@gmail.c

Re: how to test an application that's using a legacy database

2014-11-11 Thread Carl Meyer
Hi David, On 11/11/2014 08:37 AM, dpalao.pyt...@gmail.com wrote: > Dear Carl, > > Thank you for the answer. > > On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote: > > Hi David, > > On 11/11/2014 07:01 AM, dpalao...@gmail.com wrote: > > I see your point. You might be

Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Carl, Thank you for the answer. On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote: > > Hi David, > > On 11/11/2014 07:01 AM, dpalao...@gmail.com wrote: > > I see your point. You might be right, but it is not clear to me how to > > do it and if it would work: I have already

Re: how to test an application that's using a legacy database

2014-11-11 Thread Carl Meyer
Hi David, On 11/11/2014 07:01 AM, dpalao.pyt...@gmail.com wrote: > I see your point. You might be right, but it is not clear to me how to > do it and if it would work: I have already tried to subclass > DiscoverRunner to modify its behaviour with little success. If there are specific aspects of "

Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Carl, I see your point. You might be right, but it is not clear to me how to do it and if it would work: I have already tried to subclass DiscoverRunner to modify its behaviour with little success. Another problem that I see: it is not an homogenous approach. I mean, the models are created

Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Fred, Thanks a lot for the answer. Actually I got very happy when I saw it. But I sadly found out that it does not work in my case. I think the problem is related to the way Django-1.7 behaves with respect to databases, migrations and so on. Not 100% sure, though. I don't really know what

Re: how to test an application that's using a legacy database

2014-11-10 Thread Carl Meyer
Hi David, On 11/10/2014 08:14 AM, dpalao.pyt...@gmail.com wrote: > Probably I was not clear in my original post. My problem is precisely > how to switch managed to True just before the tests and put it back to > False afterwards to avoid creating of tables by hand during the tests. > That is preci

Re: how to test an application that's using a legacy database

2014-11-10 Thread Fred Stluka
David, No. You can use it unchanged. With Django 1.4 at least, and I assume also with 1.7. I have a legacy MS SQL Server DB where I have rights to modify data but not tables. I also cannot create new DBs in MS SQL Server. I used *inspectdb* to create models from the existing DB. I generally

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:08:15 PM UTC+1, donarb wrote: > > > > On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: >> >> Here comes the context. Sorry. >> >> On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >>> >>> >>> No, when you run syncdb it

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:03:57 PM UTC+1, larry@gmail.com wrote: > > On Mon, Nov 10, 2014 at 10:00 AM, > > wrote: > > Here comes the context. Sorry. > > > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com > wrote: > >> > >> > >> No, when you run syncdb it will

Re: how to test an application that's using a legacy database

2014-11-10 Thread donarb
On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: > > Here comes the context. Sorry. > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >> >> >> No, when you run syncdb it will not create or modify any existing >> tables, only create new ones.

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 10:00 AM, wrote: > Here comes the context. Sorry. > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >> >> >> No, when you run syncdb it will not create or modify any existing >> tables, only create new ones. > > > Again, are the docs wrong? Th

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
Here comes the context. Sorry. On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: > > > No, when you run syncdb it will not create or modify any existing > tables, only create new ones. > Again, are the docs

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 9:53 AM, wrote: > So what is written in the docs is wrong? Please provide some context. Quote the relevant portions of the post you're replying to. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
So what is written in the docs is wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to d

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 9:43 AM, wrote: > Hi, > I'm writing a Django application that uses an existing database. If I > understood it well, in such a case one must create non-managed models for > the legacy tables to avoid Django creating already existing tables, right? No, when you run syncdb i