Re: Django and Oracle 10g

2017-10-08 Thread Jani Tiainen
Hi.

There is nothing special with Oracle. Once you have cx_Oracle installed
just setting proper django backend and connection params.

Note oracle 10g had been out of support for good while and it's not
officually supported any more in recent Django versions. Also 11g is going
out of support soon and Django 2.0 will support Oracle 12c.

8.10.2017 3.53 ap.  kirjoitti:

> I'm new Here. I'm know Java and C#. I know php with laravel framework.
> But in Python I'm starting.
> I need to connect Python with my oracle 10g database, and with the
> cx_Oracle driver everything worked out.
> But I do not know how to use this cx_Oracle driver in Django's frameWork.
> Would someone please have an example to help. How do I proceed?
>
> Paulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/27ea0565-87d2-4dd6-883a-2b479fbfc390%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91ocgGx3444qCgbztuHM5_%3Dn4T88vEtzeOTSSLcL1KdZEeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django and Oracle 10g

2017-10-07 Thread Constantine Covtushenko
Hi Paulo,

Did you read
https://docs.djangoproject.com/en/1.11/ref/databases/#oracle-notes?

I did not use oracle backend in any of my projects.
But with Django ORM one will never depend on DB type in common scenarios.

I hope that helps.

Regards,
Constantine C.

On Sat, Oct 7, 2017 at 8:51 PM,  wrote:

> I'm new Here. I'm know Java and C#. I know php with laravel framework.
> But in Python I'm starting.
> I need to connect Python with my oracle 10g database, and with the
> cx_Oracle driver everything worked out.
> But I do not know how to use this cx_Oracle driver in Django's frameWork.
> Would someone please have an example to help. How do I proceed?
>
> Paulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/27ea0565-87d2-4dd6-883a-2b479fbfc390%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sincerely yours,
Constantine C

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK52boUoKQ%3DS-7YxGSmxGY_eXu63HEQEF%3D5LpoQ0zuoDF31bDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django and Oracle 10g

2017-10-07 Thread paulo . sovienski
I'm new Here. I'm know Java and C#. I know php with laravel framework. 
But in Python I'm starting.
I need to connect Python with my oracle 10g database, and with the 
cx_Oracle driver everything worked out.
But I do not know how to use this cx_Oracle driver in Django's frameWork. 
Would someone please have an example to help. How do I proceed?

Paulo

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/27ea0565-87d2-4dd6-883a-2b479fbfc390%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to config Django for Oracle RAC mode

2017-05-21 Thread hu huaxuan
Dear django-users,


We have two kinds of web servers. One is based on Java(tomcat + spring boot), 
while another is based on Python(Django).

Recently we changed our Oracle db to RAC mode, which theJava server can 
successfully connect to it by following config:

jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=177.177.50.112)
 
(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=177.177.50.113)(PORT=1521))(LOAD_BALANCE=NO)(FAILOVER=YES))(CONNECT_DATA=(SERVICE_NAME=aldb)(SERVER=DEDICATED)))

However for Django server, we can't find a proper way to config such 
connection. Anyone has experience to config Oracle RAC for Django?

Below is our old config which currently works well on non-RAC mode as a 
reference:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.oracle',
'NAME': 'devdb',
'USER': 'devuser',
'HOST': '177.177.50.110',
'PASSWORD': 'devpassword',
'PORT': '1521',
'CONN_MAX_AGE': 60 * 60 * 24 * 30 * 3,
}
}


Regards,

Felix Hu

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DM5PR13MB1018FD45A1ABB6C8D4DCD14ABFFB0%40DM5PR13MB1018.namprd13.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Re: django and oracle

2014-05-16 Thread Jani Tiainen
On Thu, 15 May 2014 00:07:47 -0700 (PDT)
"J. D." <john.arnold.dav...@gmail.com> wrote:

> 
> On Wednesday, 14 May 2014 21:08:11 UTC+4, Avraham Serour wrote:
> >
> > it looks like your error occurs when using django ORM with oracle, but in 
> > the beginning of your email you mention that you don't want to use it, so 
> > what's the problem here?
> >
> >  
> I want to reuse established connection with the Oracle DB (I thought django 
> connection helps with that out of the box). This is my first experience 
> with Oracle DB.
> 
> --
> 
> @Jani Tiaine, thanks for the help, but it doesn't work:
> 
> "ora_cur = connection.connection.cursor()  # See double connection stuff"
> 
> Exception Type: AttributeError  Exception Value: 
> 
> 'NoneType' object has no attribute 'cursor'

Oh sorry about that. It seems that connection attribute is only populated
when you have connection opened for something.

So you have to do initial dummy stuff:

connection.cursor()  # Opens connection

curs = connection.connection.cursor()   # Get raw cursor

Or, alternatively as a one liner:

curs = connection.cursor().cursor.cursor  # Get raw cursor


Hope that helps.

-- 

Jani Tiainen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140516101623.130d069a%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.


Re: django and oracle

2014-05-15 Thread J. D.

On Wednesday, 14 May 2014 21:08:11 UTC+4, Avraham Serour wrote:
>
> it looks like your error occurs when using django ORM with oracle, but in 
> the beginning of your email you mention that you don't want to use it, so 
> what's the problem here?
>
>  
I want to reuse established connection with the Oracle DB (I thought django 
connection helps with that out of the box). This is my first experience 
with Oracle DB.

--

@Jani Tiaine, thanks for the help, but it doesn't work:

"ora_cur = connection.connection.cursor()  # See double connection stuff"

Exception Type: AttributeError  Exception Value: 

'NoneType' object has no attribute 'cursor'


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c1e72bb3-8e69-4644-88a7-44ebeb8a4520%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Thu, 15 May 2014 07:02:08 +0300
Jani Tiainen <rede...@gmail.com> wrote:

> On Wed, 14 May 2014 07:54:58 -0700 (PDT)
> "J. D." <john.arnold.dav...@gmail.com> wrote:
> 
> > Can someone help me with cx_Oracle and Django?! :)
> > 
> > I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor 
> > with various output. I want to work with them without django ORM and 
> > directly call them.
> > 
> > First of all i ran my python code without django, with the cx_Oracle driver 
> > and everything works well.
> > 
> > conn = cx_Oracle.connect('user', 'pass')
> > ora_cur = conn.cursor()
> > l_cur = ora_cur.var(cx_Oracle.CURSOR)
> > l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
> > None, None, l_cur,))  #None -  "*in*" parameters and l_cur - *out * 
> > l_query[0].fetchall()
> > 
> > 
> > but with the django and same code, i got the error:
> > 
> > import cx_Oracle
> > from django.db import connection
> > 
> > ora_cur = connection.cursor()
> > ora_cur.execute("SELECT * from v$version") #it works
> > 
> > l_cur = ora_cur.var(cx_Oracle.CURSOR)  #-> *Error: 
> > *Variable_TypeByPythonType(): 
> > unhandled data type
> > l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
> > None, None, l_cur,))
> > l_query[0].fetchall()
> > 
> > 
> > Django Version: 1.6.4  Exception Type: NotSupportedError  Exception Value: 
> > 
> > Variable_TypeByPythonType(): unhandled data type
> > 
> > 
> > 
> >  Python Version: 2.7.3cx_Oracle 5.1.2
> > 
> 
> You're seeing that error because cursor returned from Django connection is not
> actually cx_Oracle cursor but a wrapper that has similar methods. That is 
> done to
> overcome different binding variable types and to use %s (oracle uses :name 
> format)
> 
> You should be able to get pure cx_Oracle cursor by calling:
> 
> connection._cursor()

Sorry, my bad. You can get pure cx_Oracle connection from:
connection.connection

>From there you can do:

connection.cursor().

So to rewrite your example in "django" way:

import cx_Oracle
from django.db import connection
 
ora_cur = connection.connection.cursor()  # See double connection stuff
ora_cur.execute("SELECT * from v$version") #it works
 
l_cur = ora_cur.var(cx_Oracle.CURSOR)
l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
None, None, l_cur,))
l_query[0].fetchall()


-- 
 
Jani Tiainen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140515072320.5f65715c%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.


Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Wed, 14 May 2014 07:54:58 -0700 (PDT)
"J. D." <john.arnold.dav...@gmail.com> wrote:

> Can someone help me with cx_Oracle and Django?! :)
> 
> I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor 
> with various output. I want to work with them without django ORM and 
> directly call them.
> 
> First of all i ran my python code without django, with the cx_Oracle driver 
> and everything works well.
> 
> conn = cx_Oracle.connect('user', 'pass')
> ora_cur = conn.cursor()
> l_cur = ora_cur.var(cx_Oracle.CURSOR)
> l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
> None, None, l_cur,))  #None -  "*in*" parameters and l_cur - *out * 
> l_query[0].fetchall()
> 
> 
> but with the django and same code, i got the error:
> 
> import cx_Oracle
> from django.db import connection
> 
> ora_cur = connection.cursor()
> ora_cur.execute("SELECT * from v$version") #it works
> 
> l_cur = ora_cur.var(cx_Oracle.CURSOR)  #-> *Error: 
> *Variable_TypeByPythonType(): 
> unhandled data type
> l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
> None, None, l_cur,))
> l_query[0].fetchall()
> 
> 
> Django Version: 1.6.4  Exception Type: NotSupportedError  Exception Value: 
> 
> Variable_TypeByPythonType(): unhandled data type
> 
> 
> 
>  Python Version: 2.7.3cx_Oracle 5.1.2
> 

You're seeing that error because cursor returned from Django connection is not
actually cx_Oracle cursor but a wrapper that has similar methods. That is done 
to
overcome different binding variable types and to use %s (oracle uses :name 
format)

You should be able to get pure cx_Oracle cursor by calling:

connection._cursor()

-- 

Jani Tiainen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140515070208.6b8cda16%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.


Re: django and oracle

2014-05-14 Thread Avraham Serour
it looks like your error occurs when using django ORM with oracle, but in
the beginning of your email you mention that you don't want to use it, so
what's the problem here?


On Wed, May 14, 2014 at 5:54 PM, J. D. <john.arnold.dav...@gmail.com> wrote:

> Can someone help me with cx_Oracle and Django?! :)
>
> I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor
> with various output. I want to work with them without django ORM and
> directly call them.
>
> First of all i ran my python code without django, with the cx_Oracle
> driver and everything works well.
>
> conn = cx_Oracle.connect('user', 'pass')
> ora_cur = conn.cursor()
> l_cur = ora_cur.var(cx_Oracle.CURSOR)
> l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None,
> None, None, l_cur,))  #None -  "*in*" parameters and l_cur - *out *
> l_query[0].fetchall()
>
>
> but with the django and same code, i got the error:
>
> import cx_Oracle
> from django.db import connection
>
> ora_cur = connection.cursor()
> ora_cur.execute("SELECT * from v$version") #it works
>
> l_cur = ora_cur.var(cx_Oracle.CURSOR)  #-> *Error: 
> *Variable_TypeByPythonType():
> unhandled data type
> l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None,
> None, None, l_cur,))
> l_query[0].fetchall()
>
>
> Django Version: 1.6.4  Exception Type: NotSupportedError  Exception Value:
>
> Variable_TypeByPythonType(): unhandled data type
>
>
>
>  Python Version: 2.7.3cx_Oracle 5.1.2
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eb8be6ed-f9c4-4217-ada4-0deebcd3b87c%40googlegroups.com<https://groups.google.com/d/msgid/django-users/eb8be6ed-f9c4-4217-ada4-0deebcd3b87c%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6t%2BMg_%2ByeWNP5f47VJKdX7BscyXG5O5EVyg6z0DFDaKd_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django and oracle

2014-05-14 Thread J. D.
Can someone help me with cx_Oracle and Django?! :)

I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor 
with various output. I want to work with them without django ORM and 
directly call them.

First of all i ran my python code without django, with the cx_Oracle driver 
and everything works well.

conn = cx_Oracle.connect('user', 'pass')
ora_cur = conn.cursor()
l_cur = ora_cur.var(cx_Oracle.CURSOR)
l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
None, None, l_cur,))  #None -  "*in*" parameters and l_cur - *out * 
l_query[0].fetchall()


but with the django and same code, i got the error:

import cx_Oracle
from django.db import connection

ora_cur = connection.cursor()
ora_cur.execute("SELECT * from v$version") #it works

l_cur = ora_cur.var(cx_Oracle.CURSOR)  #-> *Error: 
*Variable_TypeByPythonType(): 
unhandled data type
l_query = ora_cur.callproc('user.VIEW.procedure_with_cursor', (None, None, 
None, None, l_cur,))
l_query[0].fetchall()


Django Version: 1.6.4  Exception Type: NotSupportedError  Exception Value: 

Variable_TypeByPythonType(): unhandled data type



 Python Version: 2.7.3cx_Oracle 5.1.2


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eb8be6ed-f9c4-4217-ada4-0deebcd3b87c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Query executed two times in database (django 1.4, oracle 11g)

2013-09-08 Thread Germán
I'm not familiar with caching internals but perhaps the fact that you are using 
`raw` has something to do with your problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Query executed two times in database (django 1.4, oracle 11g)

2013-09-06 Thread bikeridercz
Dear colleagues,

I'm facing a problem probably related to caching infrastructure in DJango. 
Documentation says that data are fetched from DB once a then readed from 
cache.

However, my results are different. Query is executed two times. On my 
opinion the first fetch should be enough.

Here is a record from my debug log:

[06/Sep/2013 08:35:11] "GET /mvpn/waves/OSCAR_MVPN/ HTTP/1.1" 200 2316
DEBUG (11.092) select /*+ first_rows */rownum id, t.* from 
ngin_mvpn_wave_cdr_sum t where t.wave_id=:arg0 order by vpn_name; 
args=[u'OSCAR_MVPN'] 11.092076 select /*+ first_rows */rownum id, t.* 
from ngin_mvpn_wave_cdr_sum t where t.wave_id=:arg0 order by vpn_name 
[u'OSCAR_MVPN']
DEBUG (10.353) select /*+ first_rows */rownum id, t.* from 
ngin_mvpn_wave_cdr_sum t where t.wave_id=:arg0 order by vpn_name; 
args=[u'OSCAR_MVPN'] 10.352256 select /*+ first_rows */rownum id, t.* 
from ngin_mvpn_wave_cdr_sum t where t.wave_id=:arg0 order by vpn_name 
[u'OSCAR_MVPN']
[06/Sep/2013 08:35:35] "GET /mvpn/waves/OSCAR_MVPN/cdr/ HTTP/1.1" 200 19515


The problem is, that one execution takes 11 seconds what is acceptable 
result for business. However 20s is not. Query was already optimized - huge 
number of records from several tables is processed.

What I'm doing on view level:

...

mvpn_cdr = MVPN_WAVE_CDR_SUM.objects.raw('select /*+ first_rows */rownum 
id, t.* from ngin_mvpn_wave_cdr_sum t where t.wave_id=%s order by 
vpn_name', [wave_id])

... 

for i in mvpn_cdr:

count_moc_onnet = count_moc_onnet + i.count_moc_onnet

...

return render_to_response('ngin/mvpn_wave_cdr_sum.html', {'resultset': 
mvpn_cdr}, context_instance=c)


So, I think that "filter" method should fetch data from DB and put it into 
QuerySet cache. Further use of data should be taken from a cache.

Yes, It's fact that I was not setting any cache configuration before.

Please help or explain what I'm doing wrong.

Radim.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django and oracle --

2012-05-01 Thread Giovanni Bronzini
Simple one you are missing * item*  just before *['prezzo']*  :-)

On 28 April 2012 18:30, gmail <marco.giard...@gmail.com> wrote:

>  hello django boys,
>
> i hope someone here can help me. i have a problem with django e oracle.
> above the code with problem:
>
> insert = """insert into modello (title, descrizione, url, prezzo, sconto)
> values (:title, :descrizione, :url,
>  :prezzo, :sconto)"""
>  try:
>   self.c.execute(insert,{'title':item['title'],
> 'descrizione':item['descrizione'],
>  'url':item['url'],
> 'prezzo':['prezzo'], 'sconto':item['sconto']})
>
> when try this code the system report this error:
> ORA-01484:arrays can only be bound to PL/SQL statement
>
> ** any items is a list of different values for title,descrizione etc etc
>
> thanks
> marco
> *
> *<http://www.google.com/url?sa=t=j=ora-01484%3A%20arrays%20can%20only%20be%20bound%20to%20pl%2Fsql%20statements=web=1=0CCcQFjAA=http%3A%2F%2Fora-01484.ora-code.com%2F=LqKbT4PbDoPdtAbVhqmHAQ=AFQjCNGmLIM2XH2DAEF090ZzYaGRQWx9RA=rja>
>
> --
> 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.
>

-- 
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.



django and oracle --

2012-04-28 Thread gmail

hello django boys,

i hope someone here can help me. i have a problem with django e oracle.
above the code with problem:

insert = """insert into modello (title, descrizione, url, prezzo, 
sconto)  values (:title, :descrizione, :url, 
 :prezzo, :sconto)"""

 try:
  self.c.execute(insert,{'title':item['title'], 
'descrizione':item['descrizione'],  
 'url':item['url'], 
'prezzo':['prezzo'], 'sconto':item['sconto']})


when try this code the system report this error:
ORA-01484:arrays can only be bound to PL/SQL statement

** any items is a list of different values for title,descrizione etc etc

thanks
marco


 /
 /
 
<http://www.google.com/url?sa=t=j=ora-01484%3A%20arrays%20can%20only%20be%20bound%20to%20pl%2Fsql%20statements=web=1=0CCcQFjAA=http%3A%2F%2Fora-01484.ora-code.com%2F=LqKbT4PbDoPdtAbVhqmHAQ=AFQjCNGmLIM2XH2DAEF090ZzYaGRQWx9RA=rja>


--
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 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.



Django and Oracle XE - Empty models file

2011-01-27 Thread Nathanael Dyke
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?

-- 
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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 5:52 PM, Anurag Chourasia
 wrote:
> Hi Ian,
> Can't tell you how much this helps :-)
> Setting the variable using ctypes before the import of cx_Oracle does the
> trick for me.
> Appreciate the time you spent in helping resolve this.
> Is there any Cygwin specific doc where we could include this?
> Regards,
> Anurag

You're welcome!  I've checked a fix into trunk and the 1.2.X branch,
so future releases will not have this problem.  I don't really see a
need for documentation apart from this thread on top of that.

Cheers,
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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian,

Can't tell you how much this helps :-)

Setting the variable using ctypes before the import of cx_Oracle does the
trick for me.

Appreciate the time you spent in helping resolve this.

Is there any Cygwin specific doc where we could include this?

Regards,
Anurag

On Fri, Dec 3, 2010 at 6:10 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote:

> On Thu, Dec 2, 2010 at 5:34 PM, Anurag Chourasia
> <anurag.choura...@gmail.com> wrote:
> > Hi Ian,
> > I just tried the ctypes solution that you mentioned in your previous
> email
> > but it does not work for me.
>
> In your transcript, it appears that Django has already been loaded
> when you call the ctypes code.  The environment variable needs to be
> set *before* cx_Oracle is imported by Django, or it won't have any
> effect.  This is why I suggested patching it into the
> django/db/backends/oracle/base.py file.
>
> Cheers,
> 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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 5:34 PM, Anurag Chourasia
<anurag.choura...@gmail.com> wrote:
> Hi Ian,
> I just tried the ctypes solution that you mentioned in your previous email
> but it does not work for me.

In your transcript, it appears that Django has already been loaded
when you call the ctypes code.  The environment variable needs to be
set *before* cx_Oracle is imported by Django, or it won't have any
effect.  This is why I suggested patching it into the
django/db/backends/oracle/base.py file.

Cheers,
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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian,

I just tried the ctypes solution that you mentioned in your previous email
but it does not work for me.

Below is my session transcripts.

>>> import ctypes
*>>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8')*
*1*
>>> TerminologyMap.objects.get(term_id=8)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/site-packages/django/db/models/manager.py", line
132, in get
return self.get_query_set().get(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
336, in get
num = len(clone)
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
81, in __len__
self._result_cache = list(self.iterator())
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
269, in iterator
for row in compiler.results_iter():
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 672, in results_iter
for rows in self.execute_sql(MULTI):
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 741, in 
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 552, in fetchmany
    for r in self.cursor.fetchmany(size)])
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 625, in _rowfactory
value = to_unicode(value)
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 636, in to_unicode
return force_unicode(s)
  File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line 88,
in force_unicode
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf8' codec can't decode
bytes in position 22-24: invalid
 data. You passed in 'Registro guardado con \xe9xito' ()

Regards,
Anurag

On Fri, Dec 3, 2010 at 4:47 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote:

> On Thu, Dec 2, 2010 at 3:23 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> > Weird.  From what I can tell, this seems to have something to do with
> > Cygwin, or at least I'm able to replicate it in that environment.
> > Setting NLS_LANG in or out of process and changing the registry key
> > all have no effect.
>
> The actual problem is described here:
>
> http://rubyforge.org/forum/forum.php?thread_id=6826_id=1078
>
> and from the cx-oracle-users mailing list comes this suggestion:
>
> >>> import ctypes
> >>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8')
>
> I've tried it, and it works.  I suggest patching the above into your
> django/db/backends/oracle/base.py file, in place of the line:
>
> os.environ['NLS_LANG'] = '.UTF8'
>
> Cheers,
> 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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 3:23 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> Weird.  From what I can tell, this seems to have something to do with
> Cygwin, or at least I'm able to replicate it in that environment.
> Setting NLS_LANG in or out of process and changing the registry key
> all have no effect.

The actual problem is described here:

http://rubyforge.org/forum/forum.php?thread_id=6826_id=1078

and from the cx-oracle-users mailing list comes this suggestion:

>>> import ctypes
>>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8')

I've tried it, and it works.  I suggest patching the above into your
django/db/backends/oracle/base.py file, in place of the line:

os.environ['NLS_LANG'] = '.UTF8'

Cheers,
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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 1:21 PM, Anurag Chourasia
 wrote:
> Hi Ian,
> Here is the information requested by you.
> $ python
> Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14)
> [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
 import os
 print os.environ['NLS_LANG']
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__
>     raise KeyError(key)
> KeyError: 'NLS_LANG'
 from django.db import connection
 connection.cursor()  # Initialize the connection
 print os.environ['NLS_LANG']
> .UTF8
 print connection.connection.encoding
> WINDOWS-1252
 print connection.connection.nencoding
> WINDOWS-1252

Weird.  From what I can tell, this seems to have something to do with
Cygwin, or at least I'm able to replicate it in that environment.
Setting NLS_LANG in or out of process and changing the registry key
all have no effect.

Is there some reason you need to use Cygwin for this?  Perhaps you
would have more luck with the regular win32 python.

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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian,

Here is the information requested by you.

$ python
Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print os.environ['NLS_LANG']
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__
raise KeyError(key)
KeyError: 'NLS_LANG'
>>> from django.db import connection
>>> connection.cursor()  # Initialize the connection
>>> print os.environ['NLS_LANG']
.UTF8
>>> print connection.connection.encoding
WINDOWS-1252
>>> print connection.connection.nencoding
WINDOWS-1252
>>>

Regards,
Anurag

On Fri, Dec 3, 2010 at 12:06 AM, Ian Kelly  wrote:

> On Thu, Dec 2, 2010 at 6:43 AM, Anurag Chourasia
>  wrote:
> > Hi Ian,
> > Yes.I set the NLS_LANG in my shell to UTF8 before trying this.
> > Query using Django model still fails (direct query using cx_Oracle works
> > fine)
> > Regards,
> > Anurag
>
> Okay, so it would appear that the client encoding is not being honored
> by Oracle for some reason.  Just to verify that Django is setting it
> correctly in the first place, would you please try the following in a
> Django shell and let me know what you get?
>
> >>> import os
> >>> print os.environ['NLS_LANG']
> >>> from django.db import connection
> >>> connection.cursor()  # Initialize the connection
> >>> print os.environ['NLS_LANG']
> >>> print connection.connection.encoding
> >>> print connection.connection.nencoding
>
> If everything is correct then the second NLS_LANG should be ".UTF8"
> and both encodings should be "UTF-8".  If that is the case then I
> think your next step should be to try the cx_Oracle mailing list.
> Perhaps Anthony or somebody else there will have some idea why
> cx_Oracle or OCI are returning strings with the wrong encoding.
>
> Otherwise, we will need to figure out why the client encoding is not
> being set correctly by Django.
>
> 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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 6:43 AM, Anurag Chourasia
 wrote:
> Hi Ian,
> Yes.I set the NLS_LANG in my shell to UTF8 before trying this.
> Query using Django model still fails (direct query using cx_Oracle works
> fine)
> Regards,
> Anurag

Okay, so it would appear that the client encoding is not being honored
by Oracle for some reason.  Just to verify that Django is setting it
correctly in the first place, would you please try the following in a
Django shell and let me know what you get?

>>> import os
>>> print os.environ['NLS_LANG']
>>> from django.db import connection
>>> connection.cursor()  # Initialize the connection
>>> print os.environ['NLS_LANG']
>>> print connection.connection.encoding
>>> print connection.connection.nencoding

If everything is correct then the second NLS_LANG should be ".UTF8"
and both encodings should be "UTF-8".  If that is the case then I
think your next step should be to try the cx_Oracle mailing list.
Perhaps Anthony or somebody else there will have some idea why
cx_Oracle or OCI are returning strings with the wrong encoding.

Otherwise, we will need to figure out why the client encoding is not
being set correctly by Django.

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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Anurag Chourasia
Hi Ian,

Yes.I set the NLS_LANG in my shell to UTF8 before trying this.

Query using Django model still fails (direct query using cx_Oracle works
fine)

Regards,
Anurag

On Thu, Dec 2, 2010 at 1:20 PM, Ian Kelly  wrote:

> On Wed, Dec 1, 2010 at 7:58 PM, Anurag Chourasia
>  wrote:
>
> > This is using cx_Oracle and it works fine
> > ===
>  cx_Oracle.version
> > '5.0.3'
>  cursor.execute("select to_term from terminology_map where id=316")
>  cursor.fetchone()[0]
> > 'Registro guardado con \xe9xito'
>
> It's not clear to me which setting you used here.  Was this using the
> .UTF8 NLS_LANG as I requested?  If so, then in fact this is also
> coming back incorrectly, because that is not UTF-8.  If not, then
> we're comparing apples to oranges, since Django uses the .UTF8
> setting.
>
> Thanks,
> 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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Ian Kelly
On Wed, Dec 1, 2010 at 7:58 PM, Anurag Chourasia
 wrote:

> This is using cx_Oracle and it works fine
> ===
 cx_Oracle.version
> '5.0.3'
 cursor.execute("select to_term from terminology_map where id=316")
 cursor.fetchone()[0]
> 'Registro guardado con \xe9xito'

It's not clear to me which setting you used here.  Was this using the
.UTF8 NLS_LANG as I requested?  If so, then in fact this is also
coming back incorrectly, because that is not UTF-8.  If not, then
we're comparing apples to oranges, since Django uses the .UTF8
setting.

Thanks,
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-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Anurag Chourasia
Hi Ian,

Thanks for the response.

With cx_Oracle(version 5.0.3), the retrieval of that field value works fine
as in my original email.

It's only when i directly use the Django models way of accessing that it
fails.

Below two examples will make it more clear.

This is using Django models and it fails
==
>>> TerminologyMap.objects.filter(id=316)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
68, in __repr__
data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
83, in __len__
self._result_cache.extend(list(self._iter))
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
269, in iterator
for row in compiler.results_iter():
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 672, in results_iter
for rows in self.execute_sql(MULTI):
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 741, in 
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 552, in fetchmany
for r in self.cursor.fetchmany(size)])
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 625, in _rowfactory
    value = to_unicode(value)
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 636, in to_unicode
return force_unicode(s)
  File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line 88,
in force_unicode
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf8' codec can't decode
bytes in position 22-24: invalid
 data. You passed in 'Registro guardado con \xe9xito' ()

This is using cx_Oracle and it works fine
===
>>> cx_Oracle.version
'5.0.3'
>>> cursor.execute("select to_term from terminology_map where id=316")
>>> cursor.fetchone()[0]
'Registro guardado con \xe9xito'

Regards,
Anurag

On Wed, Dec 1, 2010 at 10:51 PM, Ian <ian.g.ke...@gmail.com> wrote:

> On Nov 30, 8:31 pm, Anurag Chourasia <anurag.choura...@gmail.com>
> wrote:
> > On Oracle 10.2 with Character-Set set to WE8MSWIN1252,
> >
> > When using Django, I try to select a Oracle row which contains a field
> with
> > value as 'Páginas', i encounter the following error "'utf8' codec can't
> > decode bytes "
>
> The NLS_LANG setting used by Django should guarantee that the data
> comes back as UTF-8 regardless of the database character set.
>
> What version of cx_Oracle are you using?
> Is the column type VARCHAR2 or NVARCHAR2?
> What do you get if you try the following, substituting the appropriate
> values?
>
> $ export NLS_LANG=.UTF8
> $ python
> >>> import cx_Oracle
> >>> conn = cx_Oracle.connect('username/passw...@dsn')
> >>> cursor = conn.cursor()
> >>> cursor.execute("SELECT PROBLEM_COLUMN FROM TERMINOLOGY_MAP WHERE ID =
> 206")
> >>> print repr(cursor.fetchone()[0])
>
> Thanks,
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Ian
On Nov 30, 8:31 pm, Anurag Chourasia 
wrote:
> On Oracle 10.2 with Character-Set set to WE8MSWIN1252,
>
> When using Django, I try to select a Oracle row which contains a field with
> value as 'Páginas', i encounter the following error "'utf8' codec can't
> decode bytes "

The NLS_LANG setting used by Django should guarantee that the data
comes back as UTF-8 regardless of the database character set.

What version of cx_Oracle are you using?
Is the column type VARCHAR2 or NVARCHAR2?
What do you get if you try the following, substituting the appropriate
values?

$ export NLS_LANG=.UTF8
$ python
>>> import cx_Oracle
>>> conn = cx_Oracle.connect('username/passw...@dsn')
>>> cursor = conn.cursor()
>>> cursor.execute("SELECT PROBLEM_COLUMN FROM TERMINOLOGY_MAP WHERE ID = 206")
>>> print repr(cursor.fetchone()[0])

Thanks,
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-us...@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.



Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-11-30 Thread Anurag Chourasia
Hi All,

On Oracle 10.2 with Character-Set set to WE8MSWIN1252,

When using Django, I try to select a Oracle row which contains a field with
value as 'Páginas', i encounter the following error "'utf8' codec can't
decode bytes "

Here is the trace from the python command prompt.

>>> tmlist = TerminologyMap.objects.filter(id=206)
>>> tmlist
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
68, in __repr__
data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
83, in __len__
self._result_cache.extend(list(self._iter))
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
269, in iterator
for row in compiler.results_iter():
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 672, in results_iter
for rows in self.execute_sql(MULTI):
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py",
line 741, in 
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 552, in fetchmany
for r in self.cursor.fetchmany(size)])
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 625, in _rowfactory
value = to_unicode(value)
  File "/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py",
line 636, in to_unicode
return force_unicode(s)
  File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line 88,
in force_unicode
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf8' codec can't decode
bytes in position 1-3: invalid data. You passed in 'P\xe1ginas' ()

Please let me know if I am doing something wrong here or if there is already
a solution available for this encoding problem.

Regards,
Anurag

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 Cartridges

2010-03-19 Thread Tom Evans
On Fri, Mar 19, 2010 at 1:21 PM, huw_at1  wrote:
> Hi Tom,
>
> Sorry if I gave the impression that I had not read around before
> posting here. Believe it or not I already have the top 5 hits on this
> search marked as read. Was it a particular page you were referring to
> since all the ones I have read are either out of date or mention
> workarounds?
>
> Cheers
>
> Huw
>

s/workaround/solution/

The first link describes a blob storage engine, for storing files in
blobs in the database:
http://www.djangosnippets.org/snippets/1305/

It also mentions it has been added as part of django-storages:
http://code.welldev.org/django-storages/wiki/DatabaseStorage

Storage engines are used for storing files, see:
http://docs.djangoproject.com/en/1.1/howto/custom-file-storage/

If you actually wanted to store blob data as part of a model, then the
third link has a solution:
http://stackoverflow.com/questions/759288/how-do-you-put-a-file-in-a-fixture-in-django#764408

If you want to know why there isn't a blob field in django by default,
try this ticket:
http://code.djangoproject.com/ticket/2417

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 Cartridges

2010-03-19 Thread huw_at1
Hi Tom,

Sorry if I gave the impression that I had not read around before
posting here. Believe it or not I already have the top 5 hits on this
search marked as read. Was it a particular page you were referring to
since all the ones I have read are either out of date or mention
workarounds?

Cheers

Huw

On Mar 19, 12:26 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Fri, Mar 19, 2010 at 11:35 AM, huw_at1 <huwdjo...@gmail.com> wrote:
> > I guess what I am asking is - can Django handle BLOBs in its models?
>
> > On 18 Mar, 16:55, huw_at1 <huwdjo...@gmail.com> wrote:
> >> Hi
>
> >> I currently have an oraclecartridgewhich performs a specific type of
> >> search on large binary objects (which thecartridgealso creates and
> >> indexes). I want to try and integrate thecartridgeinto a web app
> >> using Django however from what I have read so far it appears that
> >> Django is not designed to store BLOBs. I think I can encode the SQL
> >> for thecartridgecommands as Django allows for this. My main concern
> >> is how I go about storing these BLOBS however. Does anyone know about
> >> this or have any experience with integrating other Oracle cartridges
> >> into Django?
>
> >> Many thanks
>
> >> Huw
>
> http://lmgtfy.com/?q=django+blob
>
> Cheers
>
> Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 Cartridges

2010-03-19 Thread Tom Evans
On Fri, Mar 19, 2010 at 11:35 AM, huw_at1 <huwdjo...@gmail.com> wrote:
> I guess what I am asking is - can Django handle BLOBs in its models?
>
> On 18 Mar, 16:55, huw_at1 <huwdjo...@gmail.com> wrote:
>> Hi
>>
>> I currently have an oraclecartridgewhich performs a specific type of
>> search on large binary objects (which thecartridgealso creates and
>> indexes). I want to try and integrate thecartridgeinto a web app
>> using Django however from what I have read so far it appears that
>> Django is not designed to store BLOBs. I think I can encode the SQL
>> for thecartridgecommands as Django allows for this. My main concern
>> is how I go about storing these BLOBS however. Does anyone know about
>> this or have any experience with integrating other Oracle cartridges
>> into Django?
>>
>> Many thanks
>>
>> Huw
>

http://lmgtfy.com/?q=django+blob

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 Cartridges

2010-03-19 Thread huw_at1
I guess what I am asking is - can Django handle BLOBs in its models?

On 18 Mar, 16:55, huw_at1 <huwdjo...@gmail.com> wrote:
> Hi
>
> I currently have an oraclecartridgewhich performs a specific type of
> search on large binary objects (which thecartridgealso creates and
> indexes). I want to try and integrate thecartridgeinto a web app
> using Django however from what I have read so far it appears that
> Django is not designed to store BLOBs. I think I can encode the SQL
> for thecartridgecommands as Django allows for this. My main concern
> is how I go about storing these BLOBS however. Does anyone know about
> this or have any experience with integrating other Oracle cartridges
> into Django?
>
> Many thanks
>
> Huw

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Django and Oracle Cartridges

2010-03-18 Thread huw_at1
Hi

I currently have an oracle cartridge which performs a specific type of
search on large binary objects (which the cartridge also creates and
indexes). I want to try and integrate the cartridge into a web app
using Django however from what I have read so far it appears that
Django is not designed to store BLOBs. I think I can encode the SQL
for the cartridge commands as Django allows for this. My main concern
is how I go about storing these BLOBS however. Does anyone know about
this or have any experience with integrating other Oracle cartridges
into Django?

Many thanks

Huw

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: More DJango Tagging Oracle Issues

2009-03-24 Thread Brandon Taylor

I have confirmed that it also works as expected with cx_Oracle-5.0.1

Woohoo

On Mar 24, 2:14 pm, Brandon Taylor  wrote:
> After much digging, I was able to find the problem. In fields.py in
> django-tagging, the tags are pulled from cache when they are saved,
> rather than going back to the database.
>
> The problem I was seeing wasn't that tags werent' being applied to
> objects, or added to the database, but the input field was NOT
> reflecting the changes to the tags. The cache was not being set with
> the new values.
>
> So, I found a ticket on the tagging 
> site:http://code.google.com/p/django-tagging/issues/detail?id=28=1=c...
>
> Which has a patch, but that doesn't work for the svn checkout of
> django-tagging. I changed the _post_init method to:
>
> #fields.py
> def contribute_to_class(self, cls, name):
>         super(TagField, self).contribute_to_class(cls, name)
>
>         # Make this object the descriptor for field access.
>         setattr(cls, self.name, self)
>
>         # Save tags back to the database post-save
>         signals.post_save.connect(self._save, cls, True)
>         signals.post_init.connect(self._post_init, cls, True) #wire it
> up here
>
> def _post_init(self, **kwargs):
>         instance = kwargs['instance']
>         if instance._get_pk_val() is None:
>             self._set_instance_tag_cache(instance, '')
>         else:
>             self._set_instance_tag_cache(instance, edit_string_for_tags
> (Tag.objects.get_for_object(instance)))
>             #this re-sets the tags from the database
>
> This caused some interesting behavior on the form field. Instead of
> tags being separated by commas, and multi-word tags being enclosed in
> quotes, everything was just separated by a space. This causes tags to
> be improperly assigned on the next save. So, I changed the
> edit_string_for_tags method to:
>
> def edit_string_for_tags(tags):
>     names = []
>     for tag in tags:
>         name = tag.name
>         if u' ' in name:
>             names.append('"%s"' % name)
>             continue
>         names.append(name)
>
>     return ', '.join(names)
>
> Now tags are properly formatted in my tags text field, and tags are
> properly assigned to objects. This also does not break compatibility
> with other DB types for me. Last step will be to replace my
> cx_Oracle-4.4.1 driver with the latest 5.0.1, and see if it still
> works.
>
> Hope this helps someone out!
>
> Cheers,
> Brandon
>
> On Mar 23, 5:40 pm, Brandon Taylor  wrote:
>
> > Hi Ian,
>
> > I'm not that familiar with Oracle, so I have no idea if the problems
> > I'm experiencing are related in some way to permissions, etc, but I
> > have been reassured by my Oracle person that my user has full
> > permissions on my schema.
>
> > That being said, the TagField() will show up in admin when specifying:
>
> > from tagging.fields import TagField
>
> > class MyModel(models.Model):
> >     tags = TagField()
>
> > When I create a new record, any tags that I have entered will be saved
> > to the tagging tables and associated to the record. However, when I
> > update the record, and add tags that aren't already present, or remove
> > all of the tags, no changes to the record will occur. All of the tags
> > that were there when I created the record are still there, but no new
> > tags, and no tags removed.
>
> > If I take the *exact* same model code, and switch my database to
> > SQLite or MySQL, I have no issues. I can only deduce that it's
> > something either wrong with my Oracle permissions, or with cx_Oracle
> > itself. I have wiped out my tables, re-validated, re-sync'd. Quadruple-
> > checked my code. And still the same problem. But yes, at least I can
> > add tags.
>
> > Perplexed,
> > Brandon
>
> > On Mar 23, 4:31 pm, Ian Kelly  wrote:
>
> > > On Mar 23, 1:52 pm, Brandon Taylor  wrote:
>
> > > > Hi Everyone,
>
> > > > Is anyone having issues with Django Tagging (svn) not updating tags on
> > > > an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly)
> > > > and Django Trunk.
>
> > > Hmm.  I tried running the same model you posted before with Python 2.6
> > > and cx_Oracle 5.0.1, and I can't see that it makes any difference; it
> > > still works for me.  Glad you got it (at least partially) working,
> > > though.
>
> > > > I can add tags when a model instance is created, but update/delete is
> > > > not working.
>
> > > Can you be more specific?  It seems to be working for me.
>
> > > Regards,
> > > 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

Re: More DJango Tagging Oracle Issues

2009-03-24 Thread Brandon Taylor

After much digging, I was able to find the problem. In fields.py in
django-tagging, the tags are pulled from cache when they are saved,
rather than going back to the database.

The problem I was seeing wasn't that tags werent' being applied to
objects, or added to the database, but the input field was NOT
reflecting the changes to the tags. The cache was not being set with
the new values.

So, I found a ticket on the tagging site:
http://code.google.com/p/django-tagging/issues/detail?id=28=1=cache

Which has a patch, but that doesn't work for the svn checkout of
django-tagging. I changed the _post_init method to:

#fields.py
def contribute_to_class(self, cls, name):
super(TagField, self).contribute_to_class(cls, name)

# Make this object the descriptor for field access.
setattr(cls, self.name, self)

# Save tags back to the database post-save
signals.post_save.connect(self._save, cls, True)
signals.post_init.connect(self._post_init, cls, True) #wire it
up here

def _post_init(self, **kwargs):
instance = kwargs['instance']
if instance._get_pk_val() is None:
self._set_instance_tag_cache(instance, '')
else:
self._set_instance_tag_cache(instance, edit_string_for_tags
(Tag.objects.get_for_object(instance)))
#this re-sets the tags from the database


This caused some interesting behavior on the form field. Instead of
tags being separated by commas, and multi-word tags being enclosed in
quotes, everything was just separated by a space. This causes tags to
be improperly assigned on the next save. So, I changed the
edit_string_for_tags method to:

def edit_string_for_tags(tags):
names = []
for tag in tags:
name = tag.name
if u' ' in name:
names.append('"%s"' % name)
continue
names.append(name)

return ', '.join(names)


Now tags are properly formatted in my tags text field, and tags are
properly assigned to objects. This also does not break compatibility
with other DB types for me. Last step will be to replace my
cx_Oracle-4.4.1 driver with the latest 5.0.1, and see if it still
works.

Hope this helps someone out!

Cheers,
Brandon

On Mar 23, 5:40 pm, Brandon Taylor  wrote:
> Hi Ian,
>
> I'm not that familiar with Oracle, so I have no idea if the problems
> I'm experiencing are related in some way to permissions, etc, but I
> have been reassured by my Oracle person that my user has full
> permissions on my schema.
>
> That being said, the TagField() will show up in admin when specifying:
>
> from tagging.fields import TagField
>
> class MyModel(models.Model):
>     tags = TagField()
>
> When I create a new record, any tags that I have entered will be saved
> to the tagging tables and associated to the record. However, when I
> update the record, and add tags that aren't already present, or remove
> all of the tags, no changes to the record will occur. All of the tags
> that were there when I created the record are still there, but no new
> tags, and no tags removed.
>
> If I take the *exact* same model code, and switch my database to
> SQLite or MySQL, I have no issues. I can only deduce that it's
> something either wrong with my Oracle permissions, or with cx_Oracle
> itself. I have wiped out my tables, re-validated, re-sync'd. Quadruple-
> checked my code. And still the same problem. But yes, at least I can
> add tags.
>
> Perplexed,
> Brandon
>
> On Mar 23, 4:31 pm, Ian Kelly  wrote:
>
> > On Mar 23, 1:52 pm, Brandon Taylor  wrote:
>
> > > Hi Everyone,
>
> > > Is anyone having issues with Django Tagging (svn) not updating tags on
> > > an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly)
> > > and Django Trunk.
>
> > Hmm.  I tried running the same model you posted before with Python 2.6
> > and cx_Oracle 5.0.1, and I can't see that it makes any difference; it
> > still works for me.  Glad you got it (at least partially) working,
> > though.
>
> > > I can add tags when a model instance is created, but update/delete is
> > > not working.
>
> > Can you be more specific?  It seems to be working for me.
>
> > Regards,
> > 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
-~--~~~~--~~--~--~---



Re: More DJango Tagging Oracle Issues

2009-03-23 Thread Brandon Taylor

Hi Ian,

I'm not that familiar with Oracle, so I have no idea if the problems
I'm experiencing are related in some way to permissions, etc, but I
have been reassured by my Oracle person that my user has full
permissions on my schema.

That being said, the TagField() will show up in admin when specifying:

from tagging.fields import TagField

class MyModel(models.Model):
tags = TagField()


When I create a new record, any tags that I have entered will be saved
to the tagging tables and associated to the record. However, when I
update the record, and add tags that aren't already present, or remove
all of the tags, no changes to the record will occur. All of the tags
that were there when I created the record are still there, but no new
tags, and no tags removed.

If I take the *exact* same model code, and switch my database to
SQLite or MySQL, I have no issues. I can only deduce that it's
something either wrong with my Oracle permissions, or with cx_Oracle
itself. I have wiped out my tables, re-validated, re-sync'd. Quadruple-
checked my code. And still the same problem. But yes, at least I can
add tags.

Perplexed,
Brandon

On Mar 23, 4:31 pm, Ian Kelly  wrote:
> On Mar 23, 1:52 pm, Brandon Taylor  wrote:
>
> > Hi Everyone,
>
> > Is anyone having issues with Django Tagging (svn) not updating tags on
> > an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly)
> > and Django Trunk.
>
> Hmm.  I tried running the same model you posted before with Python 2.6
> and cx_Oracle 5.0.1, and I can't see that it makes any difference; it
> still works for me.  Glad you got it (at least partially) working,
> though.
>
> > I can add tags when a model instance is created, but update/delete is
> > not working.
>
> Can you be more specific?  It seems to be working for me.
>
> Regards,
> 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
-~--~~~~--~~--~--~---



Re: More DJango Tagging Oracle Issues

2009-03-23 Thread Ian Kelly

On Mar 23, 1:52 pm, Brandon Taylor  wrote:
> Hi Everyone,
>
> Is anyone having issues with Django Tagging (svn) not updating tags on
> an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly)
> and Django Trunk.

Hmm.  I tried running the same model you posted before with Python 2.6
and cx_Oracle 5.0.1, and I can't see that it makes any difference; it
still works for me.  Glad you got it (at least partially) working,
though.

> I can add tags when a model instance is created, but update/delete is
> not working.

Can you be more specific?  It seems to be working for me.

Regards,
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
-~--~~~~--~~--~--~---



More DJango Tagging Oracle Issues

2009-03-23 Thread Brandon Taylor

Hi Everyone,

Is anyone having issues with Django Tagging (svn) not updating tags on
an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly)
and Django Trunk.

I can add tags when a model instance is created, but update/delete is
not working.

TIA,
Brandon
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



django-jython-oracle

2008-10-09 Thread dusans

Im currenty trying to make a prototype for my company, which would use
django-jython and a oracle database. Im expiriencing problem cuz the
documentation is sparse: 
http://code.google.com/p/django-jython/wiki/DatabaseBackends
-> jython doesnt find the .jar in classpath :( tryed for a test with
postgres...

Also i dont see how can i connect to a Oracle db.

Any help would be nice :)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and Oracle, again

2006-07-07 Thread BP

My testing procedure was simple.
Typed DATABASE_ENGINE = 'oracle' in settings.py and tried initializing
that (with proper credentials, of course). It just failed, on the basic
model taken directly from the 1st part of the official tutorial.

The error was "incorrect character" so I guess noone took care of
proper SQL mapping yet. 

BP


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django and Oracle, again

2006-07-06 Thread Brett Parker

On Thu, Jul 06, 2006 at 11:52:57AM +0100, Frankie Robertson wrote:
> 
> I think the plan is that if anyone offers to maintain it then it'll
> happen, otherwise it probably won't.
> 
> On 06/07/06, BP <[EMAIL PROTECTED]> wrote:
> >
> > I've just run the 3278 revision of Django trunk against 10g XE and it's
> > far from working. Any comment on its status and planned inclusion in
> > the 0.95 release?

A fair whack of it seems to work - dates and blobs are the only 2 things
that have been a bit broken so far in my brief tests - but then I am
using it in a minorly manual way using a legacy database from another
project - it runs quite a lot nicer than the tcl that was querying it ;)

Cheers,
-- 
Brett Parker

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django and Oracle, again

2006-07-06 Thread Frankie Robertson

I think the plan is that if anyone offers to maintain it then it'll
happen, otherwise it probably won't.

On 06/07/06, BP <[EMAIL PROTECTED]> wrote:
>
> I've just run the 3278 revision of Django trunk against 10g XE and it's
> far from working. Any comment on its status and planned inclusion in
> the 0.95 release?
>
> BP
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django and Oracle, again

2006-07-06 Thread BP

I've just run the 3278 revision of Django trunk against 10g XE and it's
far from working. Any comment on its status and planned inclusion in
the 0.95 release? 

BP


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django and Oracle

2006-06-19 Thread [EMAIL PROTECTED]

Hi,

I have seen some moves in the integration of Oracle with Django.
However, I am quite lost between Trac tickets, svn (which I
cannnot access behind my corp firewall), and the latest
changes in Django.

Is it planned to support Oracle? Are there any works done in
that direction?

Lack of Oracle support is the last step preventing me from
using Django at work.

Thanks and regards.

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---