Hi Brett,
I have that environment variable set as well, but no dice. The weird
thing is I can connect to Oracle and retrieve objects when running
Django in shell, but not through the built in server when executing a
view action.
Thanks,
Brandon
On Feb 23, 11:00 am, Brett Parker
On 20 Feb 14:43, Brandon Taylor wrote:
>
> No proxy server configured in FireFox 3. I'm stumped as well. Guess I
> need to have the Oracle people in my office get in touch with their
> support people. There is one other Django person here at the
> University that might be able to help.
>
> I'll
No proxy server configured in FireFox 3. I'm stumped as well. Guess I
need to have the Oracle people in my office get in touch with their
support people. There is one other Django person here at the
University that might be able to help.
I'll post my findings here if we're able to come up with a
On Feb 20, 3:26 pm, Brandon Taylor wrote:
> Yes, I'm just using the built-in server for local development. I've
> restarted it dozens of times, cleared my browser cache, etc.
>
> Is the built-in server not compatible with Oracle? If not, I'll just
> get an
On Feb 20, 3:14 pm, Brandon Taylor wrote:
> I think I may have found the culprit (?), but I have no idea how to
> fix this. In my project folder, there is a file called sqlnet.log.
> Here's the last entry:
>
> Fatal NI connect error 12505, connecting to:
>
Yes, I'm just using the built-in server for local development. I've
restarted it dozens of times, cleared my browser cache, etc.
Is the built-in server not compatible with Oracle? If not, I'll just
get an Apache/mod_wsgi instance running on my MacBook and use that
instead. Would be nice if I
On Feb 20, 3:01 pm, Brandon Taylor wrote:
> Actually I was referring to my action in views.py to get the Category
> objects:
>
> from activity_codes.models import * (this is the auto-generated
> models.py)
>
> def home(request):
> categories =
I think I may have found the culprit (?), but I have no idea how to
fix this. In my project folder, there is a file called sqlnet.log.
Here's the last entry:
Fatal NI connect error 12505, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
Actually I was referring to my action in views.py to get the Category
objects:
from activity_codes.models import * (this is the auto-generated
models.py)
def home(request):
categories = Categories.objects.all()
return render_to_response('test.html', {'categories' :
categories})
On
On Feb 20, 2:25 pm, Brandon Taylor wrote:
> however attempting to retrieve the Category objects from a view
> results in:
> DatabaseError: ORA-00942: table or view does not exist
>
> Thoughts?
You can definitely use views with Django (although inspectdb will
blissfully
here's the inspectdb models.py file:
from django.db import models
class Subtypes(models.Model):
id = models.DecimalField(decimal_places=0, max_digits=38,
db_column='ID', primary_key=True) # Field name made lowercase.
type_id = models.DecimalField(decimal_places=0, null=True,
Ah...I think specifying db_table as "ACTIVITY_CODE.CATEGORIES" is the
problem. We don't really have schema support in Django (yes, there's
a bug recorded for this issue), and unfortunately the approach of
specifying "schema.table" as the table name will not work.
You'll probably have to do
On Feb 20, 2:08 pm, Brandon Taylor wrote:
> Hi Ian,
>
> Here's her's the quick model I wrote to try to select *something*:
>
> class TestCategory(models.Model):
> name = models.CharField(max_length=255)
> class Meta:
> db_table =
Alright, this is what I *am* able to do...
manage.py shell (from my project folder)
from my_project.models import *
categories = Categories.objects.all()
print categories (and I get 11 Category objects - woohoo!)
from django.db import connection
print connection.queries
[{'time': '0.007',
Ok, now I am absolutely confounded...
I ran: manage.py inspectdb > models.py
Then I tried to get objects from the models THAT IT CREATED FOR ME -
same friggin' error!
What in the world is up with this thing? I'm at a loss.
b
On Feb 20, 3:08 pm, Brandon Taylor wrote:
Could it be the case that your Django/Oracle user has the correct
privileges, but the tables aren't in the user's default
schema/tablespace? Django queries won't prepend the schema name,
ever, so you need to ensure that either the tables were created or
owned by the connecting user, or that
Hi Ian,
Here's her's the quick model I wrote to try to select *something*:
class TestCategory(models.Model):
name = models.CharField(max_length=255)
class Meta:
db_table = 'ACTIVITY_CODE.CATEGORIES'
If I connect via dbshell from my project, I can do: select * from
categories;
Hi Matt,
Thanks for the reply. Well, I can get connected via sqlplus and I can:
desc activities... not sure what's up from the Django side. The user
I'm connecting with has correct privileges; my Oracle person has
triple-checked.
If I try to run a syncdb, I get the Oracle environment handle
On Feb 20, 12:50 pm, Brandon Taylor wrote:
> OK, I am pretty sure I found out where to put the tns_names.ora file:
> $ORACLE_HOME/network/admin
>
> But, I'm confused as to how to specify the database name. From the
> Django Oracle docs
Sorry, ignore my previous reply since you figured it out.
It sounds like you have the tnsnames.ora and environment set up
correctly. (Basically, in settings.py, you should either specify just
DATABASE_NAME, so Oracle will use the tnsnames.ora or other lookup
mechainism based on that, or else
Good, that's progress actually!
So now cx_Oracle is finding the oracle libs correctly and giving up
when it can't figure out how to connect to the database you've
specified. So it needs to use one of Oracle's naming mechanisms to
resolve the database location, such as LDAP or Oracle's own
OK, I am pretty sure I found out where to put the tns_names.ora file:
$ORACLE_HOME/network/admin
But, I'm confused as to how to specify the database name. From the
Django Oracle docs (http://docs.djangoproject.com/en/dev/ref/
databases/?from=olddocs#id9) they have the SID as the DATABASE_NAME
Hi Matt,
Ok, I modified manage.py to add two environ variables:
import os
oracle_home = '/Users/bft228/Library/Oracle/instantclient_10_2'
os.environ['ORACLE_HOME'] = oracle_home
os.environ['DYLD_LIBRARY_PATH'] = oracle_home
Now I'm getting an error:
DatabaseError: ORA-12505: TNS:listener does
Brandon,
Usually that error arises from cx_Oracle when the ORACLE_HOME
environment variable isn't set. Try doing "manage.py shell" and
looking at what's in os.environ--if you don't see ORACLE_HOME set to
the correct location there, try fixing that first.
Matt
On Fri, Feb 20, 2009 at 9:41 AM,
Hi everyone,
I'm using Oracle instantclient_10_2 (Intel), cx_Oracle-5.0.1, OS X
10.5.6 (Intel), Python 2.6.1 and Django trunk.
My built-in server will start up correct, but, when I attempt to get
objects for a model, I receive the following error:
InterfaceError: Unable to acquire Oracle
25 matches
Mail list logo