Re: Setting Django to not quote table names

2013-03-06 Thread Ian Kelly
On Wed, Mar 6, 2013 at 1:38 AM, Ian wrote: > In the meanwhile, the commonly used workaround for this is to include the > schema in the db_table declaration like so: The other workaround which is mentioned in the ticket I linked but which I completely neglected to include

Re: Setting Django to not quote table names

2013-03-06 Thread Ian
On Tuesday, March 5, 2013 2:14:04 PM UTC-7, Steven Githens wrote: > > Hello Django Users, > > I have an app that uses Oracle and cx_Oracle for the db, and I've made the > models from an existing schema with inspectdb. > > The database schema also contains a number of sub-schemas, so they must be

Re: Setting Django to not quote table names

2013-03-05 Thread Shawn Milochik
On Tue, Mar 5, 2013 at 5:41 PM, Johan ter Beest wrote: > Not an Oracle expert at all but maybe this SO answer explains some things?: > > http://stackoverflow.com/questions/563090/oracle-what-exactly-do-quotation-marks-around-the-table-name-do > So if it's down to

Re: Setting Django to not quote table names

2013-03-05 Thread Johan ter Beest
Not an Oracle expert at all but maybe this SO answer explains some things?: http://stackoverflow.com/questions/563090/oracle-what-exactly-do-quotation-marks-around-the-table-name-do On Mar 5, 2013, at 11:12 PM, Shawn Milochik wrote: > This works for me in Postgres as well.

Re: Setting Django to not quote table names

2013-03-05 Thread Shawn Milochik
This works for me in Postgres as well. This script: from django.contrib.auth.models import User qs = User.objects.filter(username='smilochik') print qs.query.sql_with_params() returns this output: ('SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name",

Re: Setting Django to not quote table names

2013-03-05 Thread Steven Githens
Hi Shawn! Thanks for the clue. I commented out the following in oracle/base.py DatabaseOperations.quote_name and can get some tables showing up in the admin view now. ( More issues of course, but I believe them to be separate. ) # if not name.startswith('"') and not

Re: Setting Django to not quote table names

2013-03-05 Thread Shawn Milochik
I'm taking a look at this as someone pretty unfamiliar with the ORM. Hopefully someone more knowledgeable will jump in. However, in the meantime (if you're feeling adventurous), you could look in django/db/backends/oracle/base.py and have a look at function quote_name. A naive look at it makes me

Setting Django to not quote table names

2013-03-05 Thread Steven Githens
Hello Django Users, I have an app that uses Oracle and cx_Oracle for the db, and I've made the models from an existing schema with inspectdb. The database schema also contains a number of sub-schemas, so they must be accessed with schema dot table name. Looking at the SQL used for model