Re: blank and null with Oracle

2013-02-28 Thread Ian
On Wednesday, February 27, 2013 3:31:20 PM UTC-7, Skylar Saveland wrote: > > Some odd behavior with Oracle involving blank and null. > > blank is True on this field: > my_auto = models.AutoField(blank=False, null=False, primary_key=True) > > null is True on this field: > uncles = models.ManyToManyF

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: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: > > Thank you for the reply, > > The field is defined in the Django model as: > location_description = models.TextField(_('additional route information'), > blank=True) > > Data length for the corresponding column in the database

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Saturday, April 13, 2013 10:40:10 AM UTC-6, Ian wrote: > > On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: >> >> Thank you for the reply, >> >> The field is defined in the Django model as: >> location_description = models.TextField

Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 9:39 am, kamal sharma wrote: > Here is the error I am getting now: > > cd /usr/local/lib > > /usr/local/lib> sudo ln > /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1 > ln: ./libclntsh.so.10.1 is on a different file system > > /usr/local/lib> cd /usr/lib/ > /usr/lib> sudo ln /opt/

Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 11:03 am, kamal sharma wrote: > Error while trying to retrieve text for error ORA-01804 > > Here is my code to fetch the data from database. > > def cases(request, dbname, prnum=None, message=''): > >     connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'xyz')) >     cursor

Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread Ian
On Apr 21, 11:40 pm, kamal sharma wrote: > When i try the same code from python Shell then it is working fine. Okay, so it does sound to me like it's your web server blocking access to the entire ORACLE_HOME directory. Is it running under a chroot jail? If so, then you will need to copy your en

Re: cx_Oracle error: ImproperlyConfigured

2011-04-24 Thread Ian
On Apr 23, 12:29 pm, kamal sharma wrote: > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in app.wsgi > as mentioned below and when I print the os.environ in the beginning of > views.py then it shows that newly added value. It's clear that your LD_LIBRARY_PATH is fine at this poin

Re: Building app on already existing set of DB tables

2010-12-22 Thread Ian
ms or views in Oracle, so you will need to write the models by hand. 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 grou

Re: Retrieving data from Oracle DB table with column name containing special character

2011-01-06 Thread Ian
fferent. For example: serial = models.DecimalField(null=True, max_digits=10, decimal_places=2, blank=True, db_column='serial#') 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

Re: Django and Oracle XE - Empty models file

2011-01-27 Thread Ian
eated 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 you

Re: working django with existing database

2011-01-31 Thread Ian
idation. I'll make a note of this. At the very least, there should be a more descriptive error message for when this comes up. 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

Re: working django with existing database

2011-01-31 Thread Ian
laborious, then you should probably look at a different ORM. I don't know whether SQLAlchemy will do a better job introspecting your database, but it's worth a shot and can be used in conjunction with TurboGears or Pylons. Cheers, Ian -- You received this message because you are s

Re: Slow performance with Django when connected to Oracle

2011-02-08 Thread Ian
uest? It would be helpful to have at least a general idea of where it's spending so much time. 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-users@googlegroups.com. To unsubscr

Re: Slow performance with Django when connected to Oracle

2011-02-08 Thread Ian
On Feb 8, 3:15 pm, dw314159 wrote: > I am observing the same behavior in the Django shell. Here the actual > query runtime is about the same between Oracle and PostgreSQL back- > ends, but the total turnaround time is about 18 times longer with > Oracle. I believe the following code demonstrates t

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-02-28 Thread Ian
rectly, what can I do to fix this? Could you post the full traceback? That may be helpful in figuring out what is happening. Also, what versions of Django, Oracle, and cx_Oracle are you using? Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Djang

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-03-01 Thread Ian
On Mar 1, 4:23 am, lipt0n wrote: > Django 1.2.3 > python 2.6 > cx_oracle 5.0.4 > oracle 10 XE > > $ cat /var/log/nginx/localhost.error_log > 2011/02/28 16:52:39 [error] 11159#0: *47 FastCGI sent in stderr: > "Traceback (most recent call last): >   File "/usr/lib/python2.6/site-packages/flup-1.0.3.

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-03-01 Thread Ian
On Mar 1, 10:26 am, Ian wrote: > It appears that the error is actually from the previous (working) > request when Django subsequently tries to close the database > connections and fails, and since the error goes uncaught, it kills the > server. > > It's pretty weird that it

Re: DatabaseError: ORA-03127: no new operations allowed until the active operation ends

2011-03-22 Thread Ian
On Mar 22, 5:38 am, Paolo Corti wrote: > I have solved this by downgrading the cx_Oracle library from 5.1 to > 5.0.1 > I am using Oracle 11.2 > Now works well both on Django 1.2.5 and 1.3 RC with Python 2.6 > best regards > P Thanks for letting us know. I haven't yet tried cx_Oracle 5.1 myself,

Re: select_related() changes type of DecimalField?

2011-04-04 Thread Ian
gt; obvious...) Yes, this appears to be a bug. If you would, please create a ticket for it in the Django Trac so that we don't forget about it. Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: can't compare datetime.datetime to datetime.date

2014-01-27 Thread ian
You're comparing pub_date, which is a datetime.date, to timezone.now(), which is a datetime.datetime. Check the docs at http://docs.python.org/2/library/datetime.html for more. In order to convert timezone.now() to a date, just call timezone.now().date(), like: In [1]: from django.utils import

Re: Problems connecting to an oracle legacy db

2014-06-04 Thread Ian
On Wednesday, June 4, 2014 2:38:34 AM UTC-6, Vittorio wrote: > > #models.py > ... > class magazzino_vista_lista(models.Model): > id_ordine = models.IntegerField(null=False, blank=False, > db_column='ID_ORDINE') > cod_magazzino_galileo = models.CharField(max_length=48, > db_col

Re: File upload progress bar for Django?

2008-10-22 Thread Ian Lawrence
Hi very cool..thx for putting this together. You have saved me some time! Ian -- http://ianlawrence.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Django Apps

2008-10-24 Thread Ian Maurer
You should probably start by looking at these 2 projects for CMS and eCommerce: http://django-cms.org/ http://www.satchmoproject.com/ Good luck and welcome to Django! regards, Ian http://itmaurer.com/ --~--~-~--~~~---~--~~ You received this message because you

Tips for reading The Django Book in light of Django 1.0

2008-11-17 Thread Ian Fitzpatrick
Found this doc already, for what it's worth: http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide/ Thanks, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

MySQL deadlocking issues

2008-11-18 Thread Ian Lewis
I've run into the following error in a SQL DB envornment and was wondering if any one else had run into problems with Deadlocking with MySQL. What would be the proper way to handle this kind of error in Django? Do most folks simply catch the OperationalError and show some sort of error to the use

Re: MySQL deadlocking issues

2008-11-18 Thread Ian Lewis
ink we can just catch it and return an error to the user. I'm curious what you did to catch the error and retry. Did you create a custom kind of DB backend? or did you just add that logic to the particular view that was giving you trouble? Ian On Wed, Nov 19, 2008 at 1:40 PM, DavidA &l

Re: Bug? Related manager not working for custom manager?

2008-11-19 Thread Ian Lewis
John, Try checking the log output of the database server to see what is different about the SQL. Perhaps some kind of caching is going on where the manager is caching the results of it's queries? On Thu, Nov 20, 2008 at 11:21 AM, John M <[EMAIL PROTECTED]> wrote: > > I have a model with a custom

Re: I love both Django and the Google Web Toolkit. Who else thinks tighter integration would be nice?

2008-12-16 Thread Ian Lawrence
Hi look at http://autotest.kernel.org/ this is a djand and gwt application used for kernel testing. It basically sets up an RPC django server which passes json into gwt. It is a great app to learn how this all works Ian -- http://ianlawrence.info

wsgi and os.environ

2008-07-15 Thread Ian Lawrence
Hi, I am experimenting with wsgi. I saw that this can be one way to enable it: os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' this seems a little strange to me setting something global to your process. Is this best practice on the mod_wsgi world? thx Ian -- htt

newforms and commit=False

2008-07-17 Thread Ian Lawrence
e flash preview data = {'themename' : form.themename, 'userfile' : form.userfile} # Save the user approved theme in the database final_form = ThemeForm(data) final_form.save() Sorry if i have missed something obvious here Ian - -- http://ianlawrence.in

Re: newforms and commit=False

2008-07-17 Thread Ian Lawrence
ST, auto_id=AUTO_ID) so validation always fails. There is also a warning in this file that preview_post is a METHOD SUBCLASSES SHOULDN'T OVERRIDE. Any idea why not and what to watch out for if I do Thanks for your help Ian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Commen

Re: import of mysql in settings.py

2008-08-21 Thread Ian Holsman
7; and you should be able to validate the problem is with the include. regards Ian > For me, I think it's because Mac OS X 10.5.4 doesn't have this python > thing installed. The documentation and tutorial should mention this, > IMO. > > http://code.djangoproject.com

'Django in Under a Minute' screencast, requesting feedback before v1-final is ready

2008-09-03 Thread Ian Ozsvald
x27;m ShowMeDo's co-founder), assuming this longer series is well-received then we'd look to do more Django material. Cheers, Ian (ShowMeDo/ProCasts) -- Ian Ozsvald (Professional Screencaster) [EMAIL PROTECTED] http://ProCasts.co.uk http://IanOzsvald.com + http://ShowMeDo.com --~-

Re: 'Django in Under a Minute' screencast, requesting feedback before v1-final is ready

2008-09-04 Thread Ian Ozsvald
Hi Rodolfo, thanks for the feedback. I've just finished the v1 version, once it is uploaded to Vimeo etc I'll announce it here. I'm glad you liked Chrome, I figured it'd make for a change from Firefox or Safari :-) Cheers! Ian. 2008/9/4 Rodolfo <[EMAIL PROTECTED]>

ANN: 'Django in Under a Minute' screencast

2008-09-04 Thread Ian Ozsvald
8/09/04/django-in-under-a-minute-screencast/ If this screencast is well-received then I'll look into making a longer screencast accompaniment to the 4-part Django Tutorial series. I'm the co-founder of ShowMeDo, we'd love to get more involved with Django. Cheers, Ian. --

Re: 'Django in Under a Minute' screencast, requesting feedback before v1-final is ready

2008-09-07 Thread Ian Ozsvald
video comparing IE8 beta1 vs Firefox 3 went on for 8 minutes ( http://procasts.co.uk/examples.html), I wanted to challenge myself to make something under 1 minute this time. Normally I'd do 2-3 minutes for a first-time introduction to a new piece of sw. Thanks for the support! Ian. 2008/

reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
kages/django/core/urlresolvers.py", line 243, in reverse "arguments '%s' not found." % (lookup_view, args, kwargs)) NoReverseMatch: Reverse for '' with arguments '()' and keyword arguments '{}' not found. Passi

RE: reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
s@googlegroups.com Subject: Re: reverse() problems (NoReverseMatch) whats your start_search function look like Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Jan 15, 2009 at 5:00 PM, Ian Cullinan wrote: > I'm trying to use django.core.urlresolvers.reverse in the ur

RE: reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
face-search'), ) from django.core.urlresolvers import reverse reverse('face-search') Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Jan 15, 2009 at 5:13 PM, Ian Cullinan wrote: > > def start_search(request): >if request.method == 'POST'

RE: reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
pics/http/urls/#reverse seems to imply that it should work either way. Is this a bug? Cheers, Ian Cullinan -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Ian Cullinan Sent: Friday, 16 January 2009 10:57 AM To: django-users@goo

RE: reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
reference to that view should be a perfectly unambiguous way to specify which urlpattern you want. Though I'm probably missing some piece of the picture and there's an implementation detail that screws this up. Cheers, Ian -Original Message- From: django-users@googl

RE: reverse() problems (NoReverseMatch)

2009-01-15 Thread Ian Cullinan
That makes sense now, thank you. Another item for my "things that are weird in Python" list. Cheers, Ian -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Malcolm Tredinnick Sent: Friday, 16 January 2009 1:19 PM

admin_perm_test decorator?

2009-01-28 Thread Ian Cullinan
least): $ pwd /usr/lib/python2.5/site-packages/django/contrib/admin $ grep -R admin_perm_test * $ So what's the correct way to do this? Cheers, Ian Cullinan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

RE: admin_perm_test decorator?

2009-01-28 Thread Ian Cullinan
users Subject: Re: admin_perm_test decorator? On Jan 28, 7:49 pm, Ian Cullinan wrote: > The docs > athttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#protecting-cu...say > to use the "decorator provided in django.contrib.admin.utils.admin_perm_test" > to protect cust

Re: Changing default app url in development server

2009-02-03 Thread Ian Lewis
What are you trying to do? If your development appserver is conflicting with a locally installed apache then why not just use a different port? python manage.py runserver 8001 2009/2/4 knight > > Hi, > > My question is: > > Is there a way to change my default app url in development server > fro

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
ally generated table names and not finding them. In the latter case, you should specify the 'db_table' Meta option [http://docs.djangoproject.com/en/ dev/ref/models/options/#db-table] on each of your models to the actual name of the table. Hope this helps, Ian --~--~-~--~---

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
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 = 'ACTIV

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
m). We do that all the time. Again, I'd need to see the models.py to understand what's going on. Or it could be that the Django user has permissions on the table, but not on the view. Ian --~--~-~--~~~---~--~~ You received this message because you are

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
a manage.py shell, but not in a view. Also, this may seem obvious, but are you using the same settings and models modules in both places? Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
nk this is related to the original error you were getting (ORA-12505: TNS:listener does not currently know of SID) and not the current problem. Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Oracle connection issue

2009-02-20 Thread Ian Kelly
hing going on at the proxy server. If that's not the problem, then I'm stumped. Hope that helps, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Oracle connection without tnsnames.ora

2009-03-05 Thread Ian Kelly
SE_PORT = '1521' The important thing to note is that the DATABASE_NAME must be the SID in this case rather than the TNS name, which I suspect was the problem in the OP. Regards, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: count and group by aggregation

2009-03-06 Thread Ian Kelly
On Mar 6, 1:38 pm, Alex Koshelev wrote: > R.objects.values('type').aggregate(Count('type')) On Mar 6, 2:12 pm, kbs wrote: > returned an empty dict Use annotate, not aggregate: R.objects.values('type').a

Re: about checking if CharField value is empty

2009-03-14 Thread Ian Kelly
kends as opposed to  (if A > is not None and B is None) which seems not work? Yes, a form CharField will always represent an empty value as '', not None. Note that it shouldn't matter for your use case, though. The condition `if A and not B:` will work regardless of whethe

Re: Django-Tagging not working with Oracle

2009-03-19 Thread Ian Kelly
et the TagField() to show up in the admin at all without > adding a custom form for my ModelAdmin class, and when I do, it won't > populate the Tags table. This is working correctly for me with the same setup. Can you come up with a simple test cas

Re: Crazy error with utf-8 & apache (please help!)

2009-03-19 Thread Ian Kelly
't decode bytes > in position 3-4: invalid data. You passed in 'OTO\xd1O' () Indeed, that's the latin1 encoding of 'OTOÑO', not utf8. Maybe Oracle is getting somehow getting the client encoding confused. Try setting the environment variable NLS_LANG = '.UTF8&#x

Re: Django-Tagging not working with Oracle

2009-03-20 Thread Ian Kelly
On Mar 20, 8:26 am, Brandon Taylor wrote: > Hi Ian, > > Thanks for the response. The test case is adding the TagField() to any > model. > > Here's an excerpt from my model class: > > #models.py > from django.db import models > from django.contrib import adm

Re: Crazy error with utf-8 & apache (please help!)

2009-03-20 Thread Ian Kelly
e strings passed in to cx_Oracle will still be utf8- encoded and might still be mistaken for latin1. The fix to *that* would involve compiling cx_Oracle 5.0.1 with the WITH_UNICODE option, and then fixing up the backend so that it passes in unicode. I don'

Re: Django-Tagging not working with Oracle

2009-03-20 Thread Ian Kelly
On Mar 20, 12:08 pm, Brandon Taylor wrote: > Nope, still not working. If you're not defining tags = TagField() in > the model, how are you defining it? As a CharField? I'd like to see > how your model is set up. > > Of course, if I create a CharField and call it tags, it will show up. > Even over

Re: Crazy error with utf-8 & apache (please help!)

2009-03-20 Thread Ian Kelly
On Mar 20, 11:16 am, Ian Kelly wrote: > As far as I know, the NLS_LANG environment variable is the only way to > specify the client encoding in cx_Oracle.  If that can't be relied > upon within your Apache process, then I think you would need to run > Django either as a CGI or

Re: Django-Tagging not working with Oracle

2009-03-20 Thread Ian Kelly
changed this line: from tagging.forms import TagField to this: from tagging.fields import TagField Both forms.py and fields.py define a TagField class, and they're not the same thing. HTH, Ian --~--~-~--~~~---~--~~ You received this message because you are s

Re: Crazy error with utf-8 & apache (please help!)

2009-03-20 Thread Ian Kelly
On Mar 20, 3:00 pm, elm wrote: > Thanxs for the advice Ian!!! > > But unfortunately I haven't been succesful. > > I have set the NLS_LANG to .UTF8 in the directive at the > apache conf file: > > >     SetHandler python-program >     PythonHandler django.c

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 be

Re: Processing multiple forms on one page

2009-06-24 Thread Ian Lewis
Oleg, You can set a parameter in your post request that allows you to differentiate between the two POST requests. But a more clean approach would be to just have the different forms POST to different urls(views) and the redirect back to the profile page if there is an error or do whatever. Ian

Re: Odd ModelForm problem

2009-06-24 Thread Ian Lewis
I'm not sure why it might work on one server but not on another unless the version of Django was different but as far as I know form.slug is not really guaranteed to exist. Normally it gets added to form.fields or somesuch by the forms metaclass. The actual data from the post request should also n

Smipple - Social Code Snippets

2009-06-28 Thread Ian Lewis
from contributing any kind of snippets that they want. We'd love it if Ruby, PHP, Java, JavaScript or Perl developers would use the site as well! What kind of social sharing site would it be if there were only certain types of developers using it after all! Happy Co

Re: A problem about django apache mod_wsgi with oracle

2009-06-30 Thread Ian Kelly
're using the same versions of Python, cx_Oracle, and the Oracle client in both instances. Also make sure that the server process's ORACLE_HOME environment variable is set. Hope this helps, Ian --~--~-~--~~~---~--~~ You received this message because yo

Re: Django doesn't recognize the sequences/triggers in existing Oracle DB

2009-07-03 Thread Ian Kelly
rtunately, the Oracle backend doesn't currently offer a way to specify an alternative name for the sequence. However, in Django 1.1 we have changed the way AutoField values are retrieved to use a "RETURNING" clause, which in addition to being m

Combining filters on related models

2009-07-09 Thread Ian Clelland
Is there any way to construct such a query, without resorting to raw SQL? I've tried it a couple of ways with Q objects, with the same results... I'm using django 1.0, so I haven't investigated F objects at all, but I'm willing to upgrade if that's what it takes :) Thanks,

Re: Reading data from database tied to another Django project?

2009-07-10 Thread Ian Clelland
tables from the two databases together, though -- avoiding foreign keys from P1 models to P2 models should be enough. Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Nested views and urls patterns declaration order

2009-07-13 Thread Ian Clelland
like "ue/reservations/xyz" gets matched by the first regex, and passed to view_list_reservation (your inner view), rather than being passed to your outer view, as you would like. Try adding a '^' character to the front of your regular expressions, and see if the requests are passed to t

Re: SelectMultiple with Static Choices in admin Interface

2009-07-13 Thread Ian Clelland
be selected all of the time, because of the python representation of unicode strings) You probably want to be excluding the recipients field from the model form, replacing it with another field which uses the multiple-select widget. Then you can pre-set the value in the widget be

Re: code of models from oracle to mysql

2009-07-15 Thread Ian Kelly
rking properly for whatever it you > have in your original DB. DecimalField(decimal_places=-127, max_digits=126) is what the Oracle introspection returns for float columns, since that's how the database describes them. If you change them to FloatField you should be okay. Ian --~--~-

Re: Reading data from database tied to another Django project?

2009-07-15 Thread Ian Clelland
")]) def random_function_sql(self): return 'RAND()' That will let you define, in your P1 models, a complete table name like this: class Example(models.Model): ... fields ... class Meta: db_table = 'p2_database.table_name' And mysql will get

Re: problems with large data

2009-07-16 Thread Ian Kelly
t encoding is it? You mentioned that it fails around 4000 characters. Does it fail just in the 2001-4000 character range, just in the 4001+ character range, or both? Thanks, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: OT: Drawing lines in the browser

2009-08-18 Thread Ian McDowall
s just XMl and Django's templating works fine for that. There are some technical catches about the type of the document and namespaces but I can provide a worked example. The drawback is that not all browsers support SVG well. This appears to work well in recent ver

Re: database user vs schema owner

2009-04-30 Thread Ian Kelly
you're using Django trunk or the 1.1 beta version, you can use the connection_created signal to run your alter session statement at connection time. Otherwise, you could do what we do: create synonyms for the tables inside the Django user's schema. Regards, Ian --~--~-~--~~-

Re: Oracle 10g Release 2 ignored 'primary_key=True'

2009-05-15 Thread Ian Kelly
tly inserted as the table's primary key.  No ID field then > appears in the table. > > Thanks! > Mike Mike, There's no difference between the sql generated by sqlall and that generated by syncdb. Are you certain the table didn't already exist before you ran syncdb? Syncdb won

UploadHandlers and the Storage API

2009-05-21 Thread Ian Lewis
/running tests. The storage API currently handles writing itself in the save method by reading from a file like object, but you currently can't do the opposite where you are given chunks of data and you want to pass them along. Is there a particularly good way to solve this kind of problem?

Storage API and Uploading to http based storage

2009-05-21 Thread Ian Lewis
for supporting uploading directly via an UploadHandler or other data backend which requires the length as the upload handler provides the data in chunks. Any thoughts would be appreciated, Ian --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Connecting to Legacy Oracle Tables

2009-05-22 Thread Ian Kelly
views or synonyms correctly. If you have apps with models that need to be created, run manage.py sqlall on those apps, and pass the resulting sql into sqlplus or manage.py dbshell. You can also edit the generated sql by hand before running it, if you need finer-grain control. Hope that helps,

Re: oracle with us7ascii encode character lost

2009-05-25 Thread Ian Kelly
don't solve the problem, try recompiling cx_Oracle with the WITH_UNICODE option. Hope that helps, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Question about ForeignKeys and subclasses

2009-06-03 Thread Ian Lewis
that. It's reasonable enough if you are dealing with a small number of instances. See: http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance Ian On Mon, Jun 1, 2009 at 3:49 PM, Daniel Roseman < roseman.dan...@googlemail.com> wrote: > > On Jun 1, 5:3

Re: comments error

2009-06-03 Thread Ian Lewis
Iperk, Is this perhaps what you are looking for? http://docs.djangoproject.com/en/dev/ref/contrib/comments/#redirecting-after-the-comment-post On Mon, Jun 1, 2009 at 6:38 AM, lperk wrote: > > Does someone know how to redirect posted comment to another page if > you have your own form for sendi

Re: comments error

2009-06-03 Thread Ian Lewis
Looks like the next parameter doesn't really work though. See: http://groups.google.com/group/django-users/browse_thread/thread/109763039cef5c3d/470d678e46d7dfe0?hl=en&lnk=gst And: http://code.djangoproject.com/ticket/8968 2009/6/3 Ian Lewis > Iperk, > > Is this perhaps wh

Re: Question about ForeignKeys and subclasses

2009-06-03 Thread Ian Lewis
Rex, My appologies. Though the feature is in 1.0 I gave a link to the 1.1 documentation. Django 1.0 docs: http://docs.djangoproject.com/en/1.0/topics/db/models/#id7 2009/6/3 Ian Lewis > Rex, > > Django parent model instances will also have a property equal to the > lowercase

Re: Amazon S3 for File Uploads

2009-06-12 Thread Ian Lewis
would depend on what you want to do but personally I rolled my own based on Django 1.1's storage api which does a lot better job of streaming and chucking data for large files because existing options like the ones below weren't very robust . Ian On Sat, Jun 13, 2009 at 6:55 AM, M

Re: Django + Apache + mod_wsgi + Oracle -> threading problems?

2009-06-15 Thread Ian Kelly
y easy to miss when perusing the source code. The backend DatabaseWrapper class (where the connection is stored) inherits from BaseDatabaseWrapper, which inherits from threading.local. Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-09-30 Thread Ian Kelly
gt; I tested : > -http://www.djangosnippets.org/snippets/685/too. This is wholly unrelated, and I don't recommend using it unless you need full-text search support. Regards, Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread Ian Kelly
thods ? It should be okay. The only relevant difference is at the database level, where NCLOB is stored in the national character set (which is guaranteed to be Unicode) and CLOB is stored in the database character set. Regards, Ian --~--~-~--~~~---~--~~ You received

Re: form with loop over fields?

2009-11-11 Thread Ian Lewis
andraeas, You can define a choice field that takes a callable as it's choices. That way you could use the current year and loop over the subsequent years to create the list you need. Just return a two tuple that can be used as the choices for a normal field in your function. class LazyChoiceFiel

Re: Retrieving an ID from a posted form

2010-04-22 Thread Ian Lewis
ct, "Your id is %d!" % myobj.id, email_address, recipients) I hope that's what you were looking for. Ian On Thu, Apr 22, 2010 at 11:39 PM, Nick wrote: > I am working on a form process with multiple levels of submission. The > first is a front facing form with a gener

Re: Custom Form in a ModelFormset_Factory?

2010-05-18 Thread Ian Lewis
Pass the form class to modelformset_factory() in the form argument. The factory will then use the AuthorForm class as the base form class when it creates the modelform class for the formset. modelFormset = modelformset_factory(Author, form=AuthorForm) On Tue, May 18, 2010 at 7:08 AM, Michael Davi

Re: Error was: cannot import name validators

2010-05-18 Thread Ian Lewis
validators is a module that was added in Django 1.2. You probably have the wrong version of Django installed or are using Django 1.1 with a django application that requires Django 1.2. On Tue, May 18, 2010 at 6:01 PM, Pankaj Singh wrote: > pan...@pankaj-laptop:~/django_projects/pankaj$ python >

Re: Extend User

2010-05-18 Thread Ian Lewis
If you don't need the name, surname etc. then don't use them. They are optional fields. You can also implement a custom form or view when the user registers that can make sure the email has not been previously registered. If you need to add additional fields then you should create a custom profile

Re: Challenge with Annotate

2010-05-18 Thread Ian Lewis
Roland, Instead of using annotate, could you just add the avg_days_instock field as another key in the select argument to extra? Ian On Tue, May 18, 2010 at 9:03 PM, Roland van Laar wrote: > Hello, > > Question: How do I calculate the Average of a calculated field. > >

Re: Challenge with Annotate

2010-05-18 Thread Ian Lewis
27;)) ... Would that get you the group by and average field you were looking for? If not it might be easier to just write what you want as custom SQL. Ian On Tue, May 18, 2010 at 10:51 PM, Roland van Laar wrote: > On 05/18/2010 03:43 PM, Ian Lewis wrote: >> Roland, >> >&g

Re: Custom Form in a ModelFormset_Factory?

2010-05-18 Thread Ian Lewis
o any documentation that indicates > this (and other features) is an option? > > On May 18, 1:10 am, Ian Lewis wrote: >> Pass the form class to modelformset_factory() in the form argument. >> The factory will then use the AuthorForm class as the base form class >>

Re: Multiple AJAX sends within a views.py-function

2010-06-14 Thread Ian McDowall
? Regards, Ian McDowall On Jun 11, 4:15 pm, Christoph wrote: > Hi, > > normally in views.py I have a function that takes a request and > returns a render_to_response or the like. I, however, would like it to > take a request and have Django reply with multiple responses. Is there >

<    1   2   3   4   5   6   7   >