Sam, please ask Django usage questions on the django-users mailing list. This list is for discussion of the development of Django itself.
But to answer your question, it sounds like you're conflating "tablespace" with "user schema". What you're wanting to do -- have the Django user be a user other than the schema owner -- isn't currently supported by Django (but see ticket #6148, although it seems to be on the back burner right now). The approach of hacking the schema name into the db_table option will work for simple queries, but I think you'll find that it fails for more complex queries where Django munges the table name, such as when generating aliases for joins. An alternative, possibly better workaround is to create a private synonym for the table inside the schema of the Django user, so that the table appears to be in that schema even though it's really in a different schema. This will still confuse the Django management commands however, since they're looking for tables, not synonyms. Hope that answers your question. If not, please follow up on django-users rather than here. -Ian On Sat, Apr 12, 2008 at 11:33 PM, Sam Richards <[EMAIL PROTECTED]> wrote: > > If I connect to oracle as one user (e.g. test_user) but my tables are > in a different tablespace (e.g. test) > > I would expect to be able to set my class with: > class Album(models.Model): > str_album_name = models.CharField(max_length = 16, core=True) > class Meta: > db_tablespace="test" > db_table="album" > > So that a query to get everything would become: > > select test.album.str_album_name from test.album > > The problem is db_tablespace doesnt seem to do that. I did however get > it working by setting: > db_table = "test\".\"album" > > I havent tested everything, but it does seem to at least do the querys > properly, but this doesnt seem quite right. > > Or am I missing something? > > Sam. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
