Ticket #1051 - Need Advice

2 views
Skip to first unread message

Zenom

unread,
Oct 25, 2007, 8:31:27 PM10/25/07
to Django developers
So today I decided to try and bust out the patch and unit tests for
this ticket. The patch that was submitted last is pretty close other
than line numbers to get this working, HOWEVER.

The unit tests do not work. When I apply the basic patch I am able to
enter the django shell, access the model, add entries and even run
syncdb.

The issue comes into play when I try to do a unit test. It
consistently says that my schema does not exist. From what I can tell
since it is when create "test_mytable" runs, it also needs to be able
to create the schema that is set in the settings.DATABASE_SCHEMA
variable. What is the best way/place to do this? I was thinking about
doing something like running a query like (select nspname from
pg_catalog.pg_namespace;) to determine if the schema exists. Obviously
this should only run on a test, and only one time. I am not sure if
this should go in the django/db/backends/postgresql_psycopg2/base.py
or if it should go in the utils.py for tests (which it would make more
sense but wasn't able to determine what the best place for it would
be).

Anyhow this is something we want to add so we can use a schema for the
entire project (not apps like the ticket said is out of scope).

Any info / comments would be great. I am still new to python coding,
but figured I would give this a whirl anyhow.

Andy Holman

Zenom

unread,
Nov 5, 2007, 12:39:10 PM11/5/07
to Django developers
I am really dissapointed no one has responded to this. I was trying to
help out
so that we could use Django for our corporate projects and integrate
it into Django
at the same time. The sad part is this ticket has been open for 2
years now.

I really wish this ticket would be addressed so that this can be
integrated into
Django. It would truly help those of us who have legacy databases use
a great
framework.

Malcolm Tredinnick

unread,
Nov 5, 2007, 5:37:58 PM11/5/07
to django-d...@googlegroups.com
On Mon, 2007-11-05 at 09:39 -0800, Zenom wrote:
> I am really dissapointed no one has responded to this. I was trying to
> help out
> so that we could use Django for our corporate projects and integrate
> it into Django
> at the same time. The sad part is this ticket has been open for 2
> years now.

And yet it remains incomplete. We're not in the habit of committing
incomplete work. You did a response about this bit (what needs to be
done to finish it), by the way, in the thread you posted on
django-users.

There are a few reasons why you didn't get a response possibly:

(1) Obviously not a large number of people are using tablespaces. The
sort of question you were asking required some intuitive knowledge there
or somebody with the time to think it through. For me, personally, this
just isn't my highest priority, by a long way, so I usually won't reply
to a thread like this because, if I do, people confuse it with interest
and keep asking more and more questions. That sounds harsh, but time is
limited, so sometimes no answer is the most efficient reply.

(2) The description of the problem you gave is very low level and isn't
particularly understandable without seeing code. My advice would be to
just make a choice -- you were asking a question about where something
should go. So it's not a showstopper issue: pick one place and get the
patch to at least step one. Then, when somebody reviews it, they might
suggest moving it somewhere else when they can see everything in
context.

Regards,
Malcolm

--
Why be difficult when, with a little bit of effort, you could be
impossible.
http://www.pointy-stick.com/blog/

Michael Radziej

unread,
Nov 5, 2007, 5:53:44 PM11/5/07
to django-d...@googlegroups.com
Hi,

let me add:

Malcolm Tredinnick wrote:
> There are a few reasons why you didn't get a response possibly:

(3) There's a habit in this mailing list for subjects like "ticket #XXXX".
I don't know how this happened, but I don't see a lot of sense in it.

If you make it a bit more descriptive, like "tablespaces and schemas,
ticket #XXXX", the readers know what you are talking about from the
subject line, and not only after hunting down the ticket. When I'm
busy, I only scan the list for interesting subjects, and I don't
want to look up tickets just to see that I'm not interested in,
e.g., Finnish translation, or problems with Oracle, just for
an example. So, you're restricting your readers unnecessarily.

Michael

Zenom

unread,
Nov 5, 2007, 6:15:34 PM11/5/07
to Django developers
OK I will just work on getting something working half-assed so to
speak with svn and hope for the best then.

Reply all
Reply to author
Forward
0 new messages