Re: #6148. Should database schemas be created as well?

2009-08-17 Thread Ian Kelly
On Mon, Aug 17, 2009 at 8:19 AM, kmpm wrote: > > I'm working on issue http://code.djangoproject.com/ticket/6148 and > have some questions. > > If a db_schema is defined, should it be created automatically or > should the user be required to set this up in the same fashion as he > is required to se

Re: Revisit Ticket 6064?

2009-08-19 Thread Ian Kelly
On Wed, Aug 19, 2009 at 5:44 AM, gthank wrote: > > The accepted solution for Ticket 6064 does not seem to address the > original problem—initializing a *specific* connection—because it uses > the the class instead of the instance as the sender of the signal. I > attempted to reopen the ticket but

Re: Revisit Ticket 6064?

2009-08-19 Thread Ian Kelly
On Wed, Aug 19, 2009 at 8:58 AM, Ian Kelly wrote: > Besides which, the purpose of using the class as the sender is to be > able to subscribe to only certain types of connections [1].  Using the > connection instead would defeat that.  That doesn't mean we can't pass >

Re: Obtaining group members?

2009-08-26 Thread Ian Kelly
On Wed, Aug 26, 2009 at 10:36 AM, Francis Reyes wrote: > > Hi all > > I'm doing some custom permissions in modelAdmin and I need to obtain a > list of members from a the group . How can this be done? > > Thanks > > FR Please ask questions about using Django on the django-users mailing list. This

Re: Problem with history view in admin page

2009-11-24 Thread Ian Kelly
On Mon, Nov 23, 2009 at 11:00 PM, Russell Keith-Magee wrote: > On Tue, Nov 24, 2009 at 1:07 PM, Mario Briggs wrote: >> I agree that INTEGER is not the right choice, but then so too is CLOB. >> How long is this string-serialized representation going to be? greater >> than 4000 characters ? Varchar

Re: Oracle/GIS Testers Needed

2009-11-26 Thread Ian Kelly
On Thu, Nov 26, 2009 at 8:38 AM, Russell Keith-Magee wrote: > Yes - this does help. The confirms my suspicion - the problem is that > the fixture loaded in FixtureTestCase.test_fixture_loading isn't being > cleared before running the tests in QueryTestCase. > > The annoying thing is that I don't s

Re: Last call: #11863 (Model.objects.raw)

2009-12-15 Thread Ian Kelly
On Tue, Dec 15, 2009 at 4:31 PM, Jeremy Dunck wrote: > RawQuery.validate_sql excludes anything but selects, but Oracle uses > comments to do query hinting.  Can an Oracle person confirm that those > hints can't start the query SQL?  (Not worth holding up landing, of > course.) Hints always immedi

Re: Oracle backend TextField unique=True error

2009-12-18 Thread Ian Kelly
On Fri, Dec 18, 2009 at 9:00 AM, Peter Herndon wrote: > Hi all, > > I've run into a situation where syncdb produces an error on one of my models > against Oracle, but not against Postgres.  Using Postgres, one can mark a > TextField as unique=True, and syncdb works just fine.  Using Oracle, you

Oracle 11g unicode test failure?

2009-12-18 Thread Ian Kelly
We just changed our test database to Oracle 11gR2 and discovered that the unicode test case in the basic test is now failing. This may just be something wrong with our installation, because we're seeing the same problem performing the same test through sqlplus, whereas it works agains Oracle 10g X

Re: Oracle backend TextField unique=True error

2009-12-21 Thread Ian Kelly
On Sun, Dec 20, 2009 at 11:25 PM, Mario Briggs wrote: >> This is known.  The Oracle notes [1] mention that TextFields cannot be >> indexed.  Since Oracle requires indexes for unique columns, this also >> means they cannot be unique, although we should probably make that >> explicit.  It may also b

Re: Oracle backend TextField unique=True error

2009-12-21 Thread Ian Kelly
On Mon, Dec 21, 2009 at 4:44 AM, Jani Tiainen wrote: > On Mon, 2009-12-21 at 02:42 -0700, Ian Kelly wrote: >> Not currently, no.  And if I were to put in some work on improving on >> the Oracle backend's support for filtering on TextFields, I would >> concentrate first o

Re: Bug #11017: Oracle LIKEC query doesn't use index

2009-12-22 Thread Ian Kelly
On Tue, Dec 22, 2009 at 12:58 AM, Jani Tiainen wrote: > Escaping bug exists in Oracle 9.2.0.5 and earlier. It was fixed in > patchset 9.2.0.6 and any later version. > > What comes to Oracle official support options for 9.2: > Premier Support Ends: 31-Jul-2007 > Extended Support Ends: 30-Jul-2010 >

Re: Ticket #5025 - truncate filter, why hasn't it been accepted?

2009-12-30 Thread Ian Kelly
On Wed, Dec 30, 2009 at 10:25 AM, Nic Pottier wrote: > On Dec 30, 8:55 am, Alex Gaynor wrote: >> I'd highly recommend watchinghttp://www.youtube.com/watch?v=tscMnoS4YU8in it >> this *exact* question >> comes up and Russ, Malcolm, and a few other people discuss the pros >> and cons of adding new

Re: Ticket #5025 - truncate filter, why hasn't it been accepted?

2009-12-30 Thread Ian Kelly
On Wed, Dec 30, 2009 at 11:21 AM, Jerome Leclanche wrote: > > On Wed, Dec 30, 2009 at 8:02 PM, Ian Kelly wrote: >> >> What I haven't seen yet for this filter is a clear use case.  If >> you're just trying to get something working quickly, then slice is >>

Re: Ticket #5025 - truncate filter, why hasn't it been accepted?

2009-12-30 Thread Ian Kelly
On Wed, Dec 30, 2009 at 11:50 AM, David Zhou wrote: > Using CSS to truncate email addresses defeats the purpose of > truncating email addresses.  Not exactly "better", is it? That depends on whether your purpose is to make it fit in the space allotted, or to obfuscate the address. I had understo

Re: TimeField for duration

2010-01-20 Thread Ian Kelly
2010/1/20 Łukasz Rekucki : > 2010/1/21 Jerome Leclanche : >> Hi Lukasz, thanks for the wrap up >> >> Main issue is precision. I personally very, very often work with >> milliseconds, and I can imagine many use cases where I'd need to work >> with microseconds. How many of these backends do not at l

Re: TimeField for duration

2010-01-20 Thread Ian Kelly
On Wed, Jan 20, 2010 at 5:33 PM, Alex Gaynor wrote: > Ian, > > FWIW there's a ticket with a patch (of unkown quality :P) for support > for using timedeltas with F() expressions. > > Alex I know, I wrote the Oracle backend code for it. :-) I'm not talking here about passing in literal timedeltas

Re: Invalid SQL generated by objects.all()[:1]?

2010-07-15 Thread Ian Kelly
On Thu, Jul 15, 2010 at 12:04 PM, Alex Gaynor wrote: > On Thu, Jul 15, 2010 at 1:00 PM, Mark Bucciarelli wrote: >> Hi, >> >> I've just been informed by a MonetDB developer >> that LIMIT and ORDER BY clauses are not >> allowed by the SQL spec in sub-selects. >> >> I filied a bug with them because

Re: Oracle patch is ready

2007-04-29 Thread Ian Kelly
isn't to say that I'm not interested in solving the problem; I just don't know what a proper solution would entail. Any suggestions? Thanks, Ian Kelly On 4/29/07, benk <[EMAIL PROTECTED]> wrote: > > Hi Everyone, > > I think I may have found a bug with the way

Re: Oracle patch is ready

2007-05-01 Thread Ian Kelly
Hi Chris, >From your description, it sounds to me like this would cause the query to return a 4000-character varchar2 in place of the lob, and so the domain objects returned by the Django distinct query would have their TextFields truncated to 4000 characters. Silently returning truncated data i

Re: Oracle patch is ready

2007-05-02 Thread Ian Kelly
On 5/2/07, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > Matt Boersma <[EMAIL PROTECTED]> writes: > > > So this is my "ping" to see if there's any general feedback on the > > patch, and if there's any way we can facilitate it getting > > incorporated. Not a complaint! [ducks head] > > I'm doi

Re: Question for Oracle Boulder sprinters

2007-05-15 Thread Ian Kelly
e the value None and getting back the empty string, which is to be expected with this implementation. I propose that we simply bypass this subset of tests for Oracle and add new empty-string tests for those test models that don't already have one. I'd like to hear your thoughts, though.

Re: Storing Fractional Seconds in Oracle

2007-05-16 Thread Ian Kelly
(which is no longer supported by Oracle in any case), so I see no harm in dropping that bit of code. Thanks, Ian Kelly --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To p

Re: Question for Oracle Boulder sprinters

2007-05-16 Thread Ian Kelly
On 5/16/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I haven't looked at the latest patch: did you remember to document this > in models-api.txt? No, I'll have to take a look through the documentation some time and figure out what needs to be added for the b

Re: Question for Oracle Boulder sprinters

2007-05-16 Thread Ian Kelly
On 5/16/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-05-15 at 17:07 -0600, Ian Kelly wrote: > > As expected, this is causing some failures in the serializers_regress > > tests; specifically #s 15, 41, 51, 61, 91, 102, 141, 162, 181, and > > 19

Re: Can we drop Oracle 9 support?

2011-11-16 Thread Ian Kelly
On Wed, Nov 16, 2011 at 4:55 PM, Shai Berger wrote: > Hi, > > Oracle 10 has been released in 2003 -- the same year as Python 2.3, which is > no longer supported by Django. > > Oracle 9 is essentially end-of-life'd -- Oracle will not provide patches for > it, even for critical bugs, and even if you

Re: Can we drop Oracle 9 support?

2011-11-22 Thread Ian Kelly
On Tue, Nov 22, 2011 at 1:54 AM, Anssi Kääriäinen wrote: > I can do a patch for this if needed. Are you (or somebody else) > working on this? I had some specific ideas for how to approach it, but I haven't done any actual work yet. Feel free to claim it. -- You received this message because yo

Re: Suggested Oracle double-fetch fix (was Re: Can we drop Oracle 9 support?)

2011-11-24 Thread Ian Kelly
On Thu, Nov 24, 2011 at 3:00 PM, Shai Berger wrote: > While we're all at it, I would like to bring to your attention another > suggested fix for Oracle. The patch attached here tells the backend that if a > fetch operation retrieved less than the requested array size, then no further > fetch attem

Re: Django 1.4 roadmap

2011-11-29 Thread Ian Kelly
On Tue, Nov 29, 2011 at 5:10 AM, Luke Plant wrote: > 2) Broken tests: > > http://ci.djangoproject.com/builds > > It looks like tests are failing on Oracle and spatialite. I guess any > failing tests need to be added to the release blockers. I'll make a note to go through the Oracle failures soon.

Re: Python 3 port - all tests now pass on 2.7.2 and 3.2.2 with the same codebase

2011-12-02 Thread Ian Kelly
On Fri, Dec 2, 2011 at 11:34 AM, Joe & Anne Tennies wrote: > So, last time I saw, you had only run against sqlite. Do you need help > testing it against postgres, MySQL, and oracle (perhaps some unofficial > ones)? What about all the caching backends? Do we need tests Python 3 > equivalent tests f

Re: Python 3 port - all tests now pass on 2.7.2 and 3.2.2 with the same codebase

2011-12-06 Thread Ian Kelly
I've just finished going through the oracle tests and sent you a pull request that fixes a few issues: * compiler.py still had a map(None) call, that I replaced with izip_longest. * cx_Oracle doesn't seem to want to accept bools as bind parameters with Python 3; these had to be converted to ints.

Re: Python 3 port - all tests now pass on 2.7.2 and 3.2.2 with the same codebase

2011-12-06 Thread Ian Kelly
On Tue, Dec 6, 2011 at 8:46 PM, Ian Clelland wrote: > >> * compiler.py still had a map(None) call, that I replaced with >> izip_longest. > >> >> The biggest change was just adding izip_longest to utils.py3 and >> utils.itercompat. > > > I had the same issue with MySQL -- I used a block like this:

Re: FileField should be a context manager

2011-12-09 Thread Ian Kelly
On Fri, Dec 9, 2011 at 11:49 AM, Florian Apolloner wrote: > > > On Thursday, December 8, 2011 11:36:53 PM UTC+1, Alex_Gaynor wrote: >> >> It isn't alreayd?!?!  All file objects django exposes should be context >> managers, I thought I added that to a base mixin class a while ago, but >> apparently

Re: Python 3 port - all PostgreSQL tests now pass on 2.7.2 and 3.2.2 with the same codebase

2011-12-10 Thread Ian Kelly
On Sat, Dec 10, 2011 at 1:03 AM, Vinay Sajip wrote: > So - with Ian Clelland's post[1] from a couple of days ago, we have > successful runs on 2.x and 3.x using a single codebase and SQLite, > PostgreSQL and MySQL backends. I suppose Oracle will be the next one > to focus

Re: Django 1.4 alpha on December 22nd

2011-12-15 Thread Ian Kelly
On Thu, Dec 15, 2011 at 5:00 PM, Kiril Vladimirov wrote: > While I'm reading all topics, listed below I'm thinking... is it too early > to announce *experimental* Python 3.2 support in Django 1.4? Already been discussed: http://groups.google.com/group/django-developers/msg/32c3526c4efe278d?hl=en

Re: Python 3 port - notes for people wanting to review changes/port apps

2011-12-17 Thread Ian Kelly
On Dec 17, 2011 10:12 PM, "Yo-Yo Ma" wrote: > > Is this a prank, or is there really going to need to be a u('') for > every u'' (of which there are thousands, since everything is Unicode > in Django) in my Django apps, in order to use P3K? Removing the "u" is > one thing, but adding another text f

Re: incorrect check email with 'email_re' in 'django.core.validators'

2011-12-19 Thread Ian Kelly
On Mon, Dec 19, 2011 at 9:36 AM, Maxim Badika wrote: > Hello all! > > i found that > > email_re.search(u'my...@mydomain.com.') # with dot at the end of > address > > returns true. I think that is incorrect. > Thanks. That is actually correct, and it is equivalent to "my...@domain.com". See RFC 36

Re: incorrect check email with 'email_re' in 'django.core.validators'

2011-12-19 Thread Ian Kelly
On Mon, Dec 19, 2011 at 7:20 PM, Wim Lewis wrote: > > On 19 Dec 2011, at 4:50 PM, Nick Fitzsimons wrote: >> Strictly speaking that regex cannot determine that an email address is >> well-formed per the RFC as the grammar defining the form of email addresses >> is a Type 2 Chomsky Grammar and reg

Re: suggestion: Don't make the tag "url" dirty in Django1.5

2012-03-27 Thread Ian Kelly
On Tue, Mar 27, 2012 at 1:26 PM, gs412 wrote: > Less symbol is the tide, the future. for example: > coffeescript、sass、haml、slim and python, there are all less symbol, this > feature make developer fell well This is incorrect. If Python were all about "fewer symbols", then we would favor tabs ove

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-22 Thread Ian Kelly
On Tue, May 22, 2012 at 4:07 PM, Anssi Kääriäinen wrote: > I don't know about licensing... I believe the issue is that we don't > have enough manpower to keep more backends updated in core. Even now > the Oracle backend is somewhat problematic - there aren't that many > contributors (or committers

Re: Python 3 port - now available on GitHub

2012-05-28 Thread Ian Kelly
On Sat, May 26, 2012 at 4:31 AM, Vinay Sajip wrote: > Anssi, > > Thanks very much for the feedback. > >> Both Oracle and MySQL fail to run because of this error (on both 2.7 >> and 3.2): >>   File "/home/akaariai/Programming/django/tests/django/db/backends/ >> mysql/compiler.py", line 2, in >>  

Re: admin_changelist failing on Oracle

2012-06-01 Thread Ian Kelly
On Fri, Jun 1, 2012 at 11:29 AM, Vinay Sajip wrote: > I'm getting an error when syncdb tries to execute the following SQL > against Oracle 10g XE: > > CREATE OR REPLACE TRIGGER "ADMIN_CHANGELIST_EVENT_TR" > BEFORE INSERT ON "ADMIN_CHANGELIST_EVENT" > FOR EACH ROW > WHEN (new."ID" IS NULL) >    BEG

Re: admin_changelist failing on Oracle

2012-06-01 Thread Ian Kelly
On Fri, Jun 1, 2012 at 12:29 PM, Vinay Sajip wrote: > > On Jun 1, 6:39 pm, Ian Kelly wrote: >> >> The error is caused by one of the column names in the table.  See the >> second paragraph at: >> >> https://docs.djangoproject.com/en/1.4/ref/databases/#naming-i

Re: #18557: get_or_create() causes a race condition with MySQL

2012-07-16 Thread Ian Kelly
On Mon, Jul 16, 2012 at 2:18 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Okay - anyone else want to throw their thoughts at this? > > Also - messing with the isolation levels on MySQL is really not a great > idea.. it can cause all sorts of unexpected behavior. Just a thought -- I don't have

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-08 Thread Ian Kelly
On Aug 8, 2012 10:25 AM, "Cal Leeming [Simplicity Media Ltd]" < cal.leem...@simplicitymedialtd.co.uk> wrote: > > I'm not entirely sure that suggesting every query needs to be committed is the right way forward either, given that you only need to commit once before get_or_create() is called to preve

Re: Python 3 str.format()

2012-08-24 Thread Ian Kelly
On Fri, Aug 24, 2012 at 10:30 AM, Daniel Swarbrick wrote: > On 24 August 2012 18:12, Carl Meyer wrote: >> Can you link to where in the current docs it specifies that %-formatting >> is deprecated and/or will be removed? I can't even find, on a cursory >> search, where it says the new .format() st

Re: Django Oracle backend vs. numbers

2012-08-29 Thread Ian Kelly
On Wed, Aug 29, 2012 at 10:34 AM, Jacob Kaplan-Moss wrote: > Hey Shai -- > > Generally sounds like a good idea, I don't see why this shouldn't go > in. You might want to wait until someone with more Oracle experience > chimes in, but I'm having a hard time seeing why a number -> str -> > number da

Re: Django Oracle backend vs. numbers

2012-09-04 Thread Ian Kelly
Resending to the list: On Sep 4, 2012 11:44 AM, "Ian Kelly" wrote: > > On Mon, Sep 3, 2012 at 6:14 AM, Shai Berger wrote: > > On Wednesday 29 August 2012 22:17:22 Ian Kelly wrote: > >> > >> https://github.com/ikelly/django/commit/086f502a1c2acb9db27531f7

Re: Django Oracle backend vs. numbers

2012-09-04 Thread Ian Kelly
On Tue, Sep 4, 2012 at 3:28 PM, Anssi Kääriäinen wrote: > I did some digging, and the reason for the error is this line in the > patch: > self.cursor.outputtypehandler = self._outputtypehandler > > What is happening is that self has a reference to self.cursor, which > has reference to bound me

Re: Django Oracle backend vs. numbers

2012-09-25 Thread Ian Kelly
to chime in, > the pull request is https://github.com/django/django/pull/393. There is, so > far, anecdotal evidence of very significant improvements, from Ian Kelly > (original author of this patch) and myself (on a somewhat different > implementation and older Django versions, but same g

Re: Django Oracle backend vs. numbers

2012-09-25 Thread Ian Kelly
On Tue, Sep 25, 2012 at 11:47 AM, Ian Kelly wrote: > Thanks for putting together a pull request. Please note the patch > will also need to update the documentation to state the new cx_Oracle > version requirement (was 4.3.1, now 5.0.1). Also, there should probably be something about th

Re: Possible bug in django oracle backend - no way to map from model type to oracle NUMBER type.

2012-10-17 Thread Ian Kelly
On Wed, Oct 17, 2012 at 4:26 AM, Michał Nowotka wrote: > Currently I'm working with some oracle legacy db which I would like to > access using django ORM. > I have a column of type NUMERIC (without precision and scale) and all > possible values are kept there (for example, 65, 2.3, 0.5

Re: Django produce sql with table name different then specified in meta db_table

2012-10-31 Thread Ian Kelly
On Wed, Oct 31, 2012 at 1:23 PM, Shai Berger wrote: > This, almost worthy of being called an sql injection, can't be the right way > to achieve the goal. In fact, the Oracle backend (or even some higher, more > generic level) should have doubled those '"' characters to make them part of > the name

Re: Django produce sql with table name different then specified in meta db_table

2012-10-31 Thread Ian Kelly
On Wed, Oct 31, 2012 at 1:23 PM, Shai Berger wrote: > I'm not sure -- perhaps the db_tablespace option is interpreted by the > Oracle > backend as schema, which would allow what Michal is trying to do with a > sane > API. Otherwise, I'd advise Michal to look at Oracle's table aliases, and > mark

Re: Django produce sql with table name different then specified in meta db_table

2012-10-31 Thread Ian Kelly
On Wed, Oct 31, 2012 at 12:34 PM, Michał Nowotka wrote: > Another thing - this name is not truncated - some junk is appended and not > after 30 characters but earlier and only for some table names regardless of > length. > The truncation actually truncates to 26 characters and then appends the f

Re: Django produce sql with table name different then specified in meta db_table

2012-10-31 Thread Ian Kelly
On Wed, Oct 31, 2012 at 2:18 PM, Michał Nowotka wrote: > But what is really buggy here is if i explicitly specify that this > table is not managed django should respect db_table and not perform > any truncation. That's all. > It won't truncate the name if you fully enclose it in quotes. Instead

Re: Django produce sql with table name different then specified in meta db_table

2012-10-31 Thread Ian Kelly
On Wed, Oct 31, 2012 at 2:57 PM, Łukasz Rekucki wrote: > Why all the slashes ? Unless you specify r'' or make them double, they > don't do anything! > Because the OP had them, and for visual clarity, since it can be hard to distinguish whether '" is an a single quote followed by a double quote o

Re: Confusion with Unicode

2012-11-24 Thread Ian Kelly
On Sat, Nov 24, 2012 at 6:55 AM, Santiago Basulto wrote: > Hey guys, i'm posting this here because I posted this on django-users > yesterday and didn't get any help. > > I'm kind of confused here... > > If I get data from a request, say: > > request.GET.get("something") or request.POST.get("someth

Re: Oracle backend bug makes testing on oracle slower?

2012-12-11 Thread Ian Kelly
On Tue, Dec 11, 2012 at 6:31 AM, Shai Berger wrote: > Hi all, > > I've just been hit by a very simple and annoying bug on Oracle, on Django > 1.3.4. Without testing, it seems to no longer be as bad on master, but a shade > of it still remains. > > The bug is this: The DatabaseFeatures for the Orac

Re: URLField definition on creation.py

2012-12-17 Thread Ian Kelly
On Mon, Dec 17, 2012 at 3:40 PM, maxi wrote: > I was seeing that the new URLField [1] is just defined on oracle backend > (into creation.py) > Why not in other backend modules? Actually, I think that line in oracle/creation.py is dead code. The internal type of URLField is CharField, so the Char

Re: Possible ORM bug with SQL syntax & generic relations

2013-01-30 Thread Ian Kelly
On Wed, Jan 30, 2013 at 4:30 PM, Dylan Klomparens wrote: > Hello, > > I've encountered what may be a Django ORM bug and am writing to see what the > dev community thinks. I have a model that uses generic relations. An error > is returned when I attempt to delete multiple rows of said model in the

Re: Possible ORM bug with SQL syntax & generic relations

2013-01-30 Thread Ian Kelly
On Wed, Jan 30, 2013 at 10:10 PM, Dylan Klomparens wrote: > It's interesting this seems to work with 10g XE. I am not sure if this is > relevant, but I am using the Full Oracle Client with Administrative Tools > (as oppose to the Oracle Instant Client) and cx_Oracle for Python access to > the data

Re: Request for review / Multiple time zone support for datetime representation

2013-02-12 Thread Ian Kelly
On Tue, Feb 12, 2013 at 2:25 PM, Aymeric Augustin wrote: c.execute("""SELECT "DT" FROM "TIMEZONES_EVENT" WHERE EXTRACT(MONTH FROM CAST((FROM_TZ("DT", 'UTC') AT TIME ZONE (:arg)) AS DATE)) = 1""", ['Africa/Nairobi']).fetchall() > Traceback (most recent call last): > File "", line

Re: Request for review / Multiple time zone support for datetime representation

2013-02-12 Thread Ian Kelly
On Tue, Feb 12, 2013 at 3:06 PM, Ian Kelly wrote: > On Tue, Feb 12, 2013 at 2:25 PM, Aymeric Augustin > wrote: >>>>> c.execute("""SELECT "DT" FROM "TIMEZONES_EVENT" WHERE EXTRACT(MONTH FROM >>>>> CAST((FROM_TZ(&quo

Re: Request for review / Multiple time zone support for datetime representation

2013-02-13 Thread Ian Kelly
On Tue, Feb 12, 2013 at 3:35 PM, Aymeric Augustin wrote: >> Against the possible issue of non-recognition of UTC, I suggest using >> '0:00' instead of 'UTC'. > > Thanks for looking into this problem! > > I tried '0:00' instead of 'UTC', and '+03:00' instead of > 'Africa/Nairobi' with the same resu

Re: ANNOUNCE: Django 1.5 release candidate 2, Django 1.4.4, Django 1.3.6 (security releases)

2013-02-20 Thread Ian Kelly
On Feb 20, 2013 4:41 PM, "Carl Meyer" wrote: > > On 02/20/2013 04:25 PM, Nick Phillips wrote: > >> There was extensive back-and-forth discussion of this in writing the > >> patch. The issue is that in almost all cases the correct value of the > >> setting in local development and under test are di

Re: first() and last(), earliest() and latest()

2013-02-27 Thread Ian Kelly
On Wed, Feb 27, 2013 at 3:34 PM, Wim Feijen wrote: > Which style do you prefer? > > .filter(last_name__startswith='b').order_by('last_name').first()# clear > and long > .first(last_name__startswith='b').order_by('last_name')# first method > has filter syntax. > .filter(last_name__startswit

Re: Switch to database-level autocommit

2013-03-05 Thread Ian Kelly
On Tue, Mar 5, 2013 at 6:38 AM, Shai Berger wrote: > I'm not sure what you mean by "unsafe". > > Version 1: code in the question > > rows = MyModel.objects.all() > for row in rows: > try: > MyModel.objects.get(photo_id=row.photo_id) > except:

Re: Switch to database-level autocommit

2013-03-05 Thread Ian Kelly
On Tue, Mar 5, 2013 at 3:13 PM, Aymeric Augustin wrote: > In the mean time, I discovered that it's impossible to implement > TransactionMiddleware reliably as a middleware, because there's no guarantee > that process_response or process_exception will be called. Perhaps this could be fixed. We c

Re: Test failures under Oracle

2013-03-10 Thread Ian Kelly
On Sun, Mar 10, 2013 at 1:52 AM, Aymeric Augustin wrote: > Hi folks, > > At the moment, a few tests are failing under Oracle. I've created tickets for > each of them: > > https://code.djangoproject.com/ticket/20010 > https://code.djangoproject.com/ticket/20011 > https://code.djangoproject.com/tic

Re: Test failures under Oracle

2013-03-10 Thread Ian Kelly
On Sun, Mar 10, 2013 at 1:44 PM, Petite Abeille wrote: > > On Mar 10, 2013, at 8:28 PM, Aymeric Augustin > wrote: > >> Django does this already: >> https://github.com/django/django/blob/master/django/db/backends/oracle/base.py#L548-L555 > > Perfect. > > In the case of #20015, the issue is the ot

Re: Test failures under Oracle

2013-03-10 Thread Ian Kelly
On Sun, Mar 10, 2013 at 2:15 PM, Petite Abeille wrote: > > On Mar 10, 2013, at 8:28 PM, Aymeric Augustin > wrote: > >> https://github.com/django/django/blob/master/django/db/backends/oracle/base.py#L548-L555 > > Last but not least… I couldn't help notice these suspicious looking operators: > > h

Re: Test failures under Oracle

2013-03-10 Thread Ian Kelly
On Sun, Mar 10, 2013 at 3:03 PM, Petite Abeille wrote: > Another point perhaps worthwhile mentioning: > > # There's no way for the DatabaseOperations class to know the > # currently active Oracle version, so we do some setups here. > > https://github.com/django/django/blob/master/d

Re: URL dispatcher fallthrough?

2013-03-19 Thread Ian Kelly
On Tue, Mar 19, 2013 at 12:26 PM, Felipe Prenholato wrote: > Hi Julian. My 2 cents. > > What you want is: > > urlpatterns = patterns('', > url_fallthrought(r'^(?P[-\w]+)$', > views=[(ProductView.as_view(), >CategorView.as_view(), >OccasionView.as

Re: Settings for a pure Oracle multi-db Django test suite setup

2010-11-10 Thread Ian Kelly
On Mon, Nov 8, 2010 at 10:02 PM, Ramiro Morales wrote: > Has anybody had success with this setup i.e. one where the 'default and > 'other' > alias pointing to such an Oracle product/install?. Is it possible at all? > > If so, could you please share the relevant Django settings file (not > really,

Re: #14770: Set cookies from request: Design decision needed

2010-11-24 Thread Ian Kelly
On Wed, Nov 24, 2010 at 1:11 PM, Jacob Kaplan-Moss wrote: >> In my >> case I was creating a small framework for registering functions that >> would check for and set messages via the messages framework. If I >> called the view and passed the request and response to these >> functions, the messages

Re: Is their much benefit In using a second hidden salt

2010-12-07 Thread Ian Kelly
On Tue, Dec 7, 2010 at 2:27 PM, andy wrote: > However I'm a bit curious about the significance of adding a second > salt to the password before it is hashed and then using the regular > per-user salt. Currently my opinion is that their is added benefit > since it make dictionary attacks more chall

Re: django.contrib.admin and null=True

2010-12-07 Thread Ian Kelly
On Tue, Dec 7, 2010 at 4:26 PM, schinckel wrote: > I think this is broken behaviour: NULL values are semantically > different to empty strings, and in certain cases (I think it was > IPAddressField, but I will have another look later), it would fail to > write to the database. > > Is there a reaso

Re: Python 3

2010-12-15 Thread Ian Kelly
On Wed, Dec 15, 2010 at 12:45 AM, sirex wrote: > On 15 Gruo, 01:51, Russell Keith-Magee > wrote: >> but we're not planning to actively support Python 3 any time soon. > > Why? Dependencies, for one. Psycopg2 and MySQLdb do not officially support Python 3 yet, so the only backends available out

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2010-12-21 Thread Ian Kelly
On Tue, Dec 21, 2010 at 10:31 AM, Dan Fairs wrote: > I've mainly worked on the tests and docs, not the core content of the patch, > but I'd welcome any comments on the implementation as well - I'd like to see > this get in (be it in a 1.3 or 1.4 timeframe) so if any changes are needed > for tha

Re: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)

2011-02-22 Thread Ian Kelly
2011/2/22 Alexander Bolotnov > I created a simple model: > > class Menu(models.Model): > name = models.CharField(null=False, > blank=False,unique=True,max_length=50) > url = models.CharField(null=False, blank=False, > unique=True,max_length=100) > sortOrder = models.IntegerField(null=

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Ian Kelly
2011/3/8 Łukasz Rekucki : > It's also supported by Oracle, AFAIK. It is not, although it can be emulated using an analytic query. I tried adding this to the patch in #6422 some time ago, but I found that the structure of an analytic query was going to be rather complicated to shoe-horn that into

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-09 Thread Ian Kelly
2011/3/9 Łukasz Rekucki : > It's probably messy in general case, but maybe we can try emulating > this in this particular case. Using an ordinary DISTINCT in a subquery > seems to solve the issue: > >    base_query = > self.rel.to._default_manager.using(db).complex_filter(self.rel.limit_choices_to)

Re: secret key from file...

2011-03-22 Thread Ian Kelly
On Tue, Mar 22, 2011 at 6:44 AM, Kristaps Kūlis wrote: >  I personally would greatly appreciate update in docs to show "best > way" to handle per enviroment settings / sensitive settings, as now > there is many ways :) >  Consider when one has his local development enviroment with locmem > cache a

Re: secret key from file...

2011-03-22 Thread Ian Kelly
On Tue, Mar 22, 2011 at 4:49 PM, Matt Robenolt wrote: > Why not just do an import for your custom settings? > > try: >        from site_settings import * > except ImportError: >        pass No particularly compelling reason that I know of, the import machinery is just unnecessary in this case. T

Re: secret key from file...

2011-03-22 Thread Ian Kelly
On Tue, Mar 22, 2011 at 5:17 PM, Carl Meyer wrote: > Interesting. I would have assumed that the reason is so that code in > site_settings.py has access to the previously defined values in the main > settings.py, and can actually modify them (i.e. append to > MIDDLEWARE_CLASSES or whatnot). With an

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2011-04-13 Thread Ian Kelly
On Wed, Apr 13, 2011 at 2:08 PM, Dan Fairs wrote: > However, > it's worth mentioning that the Oracle tests seemed to be mostly broken in > the first place, with dozens of errors. Thanks for following up on those. I reviewed the Oracle tests shortly before the 1.3 release and fixed all the real f

Re: math tag

2011-05-03 Thread Ian Kelly
On Tue, May 3, 2011 at 12:57 PM, Johannes Dollinger wrote: > * __mul__: Display a value of 0.42 as 42%. This would be better implemented as a "percentage" filter, IMO. It would be a natural candidate for inclusion in django.contrib.humanize. -- You received this message because you are subscri

Re: Test optimizations (2-5x as fast)

2011-05-17 Thread Ian Kelly
On Mon, May 16, 2011 at 10:12 PM, David Cramer wrote: > Postgres requires resetting the sequences I believe. I just assume > Oracle/MSSQL are probably similar. Actually in the Oracle backend, resetting the sequence for an empty table is currently a no-op for transactional reasons. -- You receiv

Re: Removal of DictCursor from raw query.. why??

2011-06-17 Thread Ian Kelly
On Fri, Jun 17, 2011 at 5:54 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Because I feel this is just something that should work (or be available) out > of the box. There are plenty of other places where Django docs has included > code snippets to give the user a heads up, and I think this is t

Re: Timezone-aware storage of DateTime

2011-06-30 Thread Ian Kelly
On Thu, Jun 30, 2011 at 3:10 PM, Aymeric Augustin wrote: > Strictly speaking, converting a naive datetime + a time zone to a "point in > time" (eg. UTC timestamp) isn't possible, because of DST: one hour doesn't > exist, and another one happens twice. In my opinion, the primary goal of the > Da

Re: please reopen ticket 15567

2011-09-13 Thread Ian Kelly
On Tue, Sep 13, 2011 at 11:24 AM, Adam Jenkins wrote: > +1 on making the error say more than incorrect username/password. That > is confusing. In regards to leaking information about the user. The > error message in general could be changed to something like this, of > course with better wording:

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Ian Kelly
Have a look at the DatabaseOperations.max_in_list_size method, but it sounds like it's not going to be a simple constant for MySQL. On Oct 3, 2011 1:01 PM, "Cal Leeming [Simplicity Media Ltd]" < cal.leem...@simplicitymedialtd.co.uk> wrote: > Ahh - max_allowed_packet pops up its ugly head again - it

Re: queryset caching note in docs

2011-11-02 Thread Ian Kelly
On Wed, Nov 2, 2011 at 5:05 AM, Anssi Kääriäinen wrote: > For PostgreSQL this would be a nice feature. Any idea what MySQL and Oracle > do currently? If I'm following the thread correctly, the oracle backend already does chunked reads. The default chunk size is 100 rows, IIRC. -- You received

Re: Django releases

2008-06-09 Thread Ian Kelly
On Mon, Jun 9, 2008 at 2:07 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > On 6/9/08, James Bennett <[EMAIL PROTECTED]> wrote: > >> So please, in all honesty, tell me why you think Django's development >> process isn't "visible" enough for people who are concerned and want >> to get information.

Re: MySQL and DatabaseFeatures.autoindexes_primary_keys (was: Django releases)

2008-06-11 Thread Ian Kelly
On Wed, Jun 11, 2008 at 12:18 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > On 6/9/08, Ian Kelly <[EMAIL PROTECTED]> wrote: > >> I don't know why this is so mysterious. A small amount of browsing >> turns up that the code was added in revision [4916] a

Re: MS SQL backend as a proper external backend (was: RFC: Django 1.0 roadmap and timeline)

2008-06-12 Thread Ian Kelly
On Thu, Jun 12, 2008 at 6:35 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > Since then I've opened ticket [2]#7420 with a patch that would reduce the list > of things needed to patch in Django to just *one item: Taking in account the > fact that in pyodbc seems to be the only DB-API2 adapter wher

Re: MS SQL backend as a proper external backend (was: RFC: Django 1.0 roadmap and timeline)

2008-06-16 Thread Ian Kelly
On Mon, Jun 16, 2008 at 5:10 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > /me greps over the cx_Oracle 4.3.3 and 4.4 source trees. > > It's me or cx_Oracle doesn't have an autocommit symbol at all?. In > fact, it hasn't > a set_isolation_level one either. It does as of version 4.3.2. I know t

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Ian Kelly
On Thu, Aug 21, 2008 at 10:00 AM, Waylan Limberg <[EMAIL PROTECTED]> wrote: > I had thought that I read from that same source that formatting is > faster than concatenation (and that's why I checked there before > responding), but I don't see that mentioned. Not sure where I got that > idea or if

Re: dealing with legacy tables without primary key

2008-10-02 Thread Ian Kelly
On Thu, Oct 2, 2008 at 2:21 PM, Eric <[EMAIL PROTECTED]> wrote: > On Oct 2, 4:51 pm, Ludvig Ericson <[EMAIL PROTECTED]> wrote: >> On Oct 2, 2008, at 10:31, Eric wrote: >> > Hi, >> > I saw few questions from people who wonder how to manage tables >> > without primary key (when using inspectdb on a

  1   2   >