Re: Django and Oracle XE - Empty models file

2011-01-28 Thread Jani Tiainen
On Friday 28 January 2011 11:45:48 Nathan wrote:
> Cheers for the reply. The database in question is a remote database. I
> presume by Django user that you're referring to the local user account?
> Otherwise the user credentials in settings should be adequate.
> 
> I'm guessing the only resolution to this is to hand craft the models?

That is correct.

You just have to remember declare managed = False ni API, and from my 
experience (working with legacy Oracle DB for a good while), it's better to 
pick only what you need.

One special note: Oracle DATE field stores both - date and time with resolution 
of a second. 

There is no equivalent field in Django. If you use date.DateTimeField you get 
all kind of nasty exceptions when working with this kind of a legacy data 
because DateTimeField expects to find TIMESTAMP type (date/time with resolution 
of a fractions of a second)

We've worked around this by declaring our own custom field.

-- 

Jani Tiainen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django and Oracle XE - Empty models file

2011-01-28 Thread Nathan
Cheers for the reply. The database in question is a remote database. I 
presume by Django user that you're referring to the local user account? 
Otherwise the user credentials in settings should be adequate. 

I'm guessing the only resolution to this is to hand craft the models?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django and Oracle XE - Empty models file

2011-01-27 Thread Ian
On Jan 27, 3:53 am, Nathanael Dyke  wrote:
> I've only recently started playing with Django to undertake a technology
> assessment of the various frameworks available. As part of the assessment it
> needs to integrate with a legacy Oracle XE database (I know) which will
> contain customer data, with the default database being MySQL and containing
> all the project site data.
>
> When running inspectdb on the Oracle XE database it produces an empty models
> file except for the import header. When running this against the MySQL
> database the models table is created correctly.
>
> Does anyone have any suggestions on resolving this problem?

Hi Nathanael,

inspectdb on Oracle will only find tables in the Django user's
schema.  It doesn't inspect views or synonyms or tables in other
schemas.  I would guess that one of these describes your situation.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.