~ubuntu-branches/ubuntu/jaunty/python-django/jaunty-backports

« back to all changes in this revision

Viewing changes to django/db/backends/oracle/introspection.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115191533-xbt1ut2xf4fvwtvc
Tags: 1.0.1-0ubuntu1
* New upstream release:
  - Bug fixes.

* The tests/ sub-directory appaers to have been dropped upstream, so pull
  our patch to workaround the tests and modify the rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    # Maps type objects to Django Field types.
9
9
    data_types_reverse = {
10
10
        cx_Oracle.CLOB: 'TextField',
11
 
        cx_Oracle.DATETIME: 'DateTimeField',
 
11
        cx_Oracle.DATETIME: 'DateField',
12
12
        cx_Oracle.FIXED_CHAR: 'CharField',
13
13
        cx_Oracle.NCLOB: 'TextField',
14
14
        cx_Oracle.NUMBER: 'DecimalField',
16
16
        cx_Oracle.TIMESTAMP: 'DateTimeField',
17
17
    }
18
18
 
 
19
    try:
 
20
        data_types_reverse[cx_Oracle.NATIVE_FLOAT] = 'FloatField'
 
21
    except AttributeError:
 
22
        pass
 
23
 
19
24
    def get_table_list(self, cursor):
20
25
        "Returns a list of table names in the current database."
21
26
        cursor.execute("SELECT TABLE_NAME FROM USER_TABLES")