".count" in template does not work for "raw" queries

2014-03-10 Thread bikeridercz
Dear colleagues, please help, it seem that count method used in template does not work for collections of records populated in views via direct "raw" query. *Example in view:* recordset = ASSETS.objects.raw('select s.col1, s.col2 from table s where s.col3 = to_char(%s)', [xxx]) *Example in

RAW query to non default DB

2014-03-07 Thread bikeridercz
Dear colleagues, I'm trying to do a direct select do database other than the default one. But it fails with error. Note 1: "ASSETS.objects*.using('vodb')*.filter(...)" works fine Note 2: the select is little tricky and unfortunately cannot be replaced by a database view, because I have no

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

l10n not loaded from base.html template

2012-12-31 Thread bikeridercz
Dears, strange thing happens to me, {% load l10n %} is not loaded in my base.html template, all other things like css works well. Thus I'm forced to {% load l10n %} in every template. I'm using formating numbers usings{% localize on %} and {% endlocalize %} tags. Can You help to solve this

504 Gateway Timeout

2012-11-29 Thread bikeridercz
Dear all, I'm just facing a problem with little longer runnig SQL select command, and DJago framework returns a "504 Gateway Timeout" after aprox 10 seconds. My sql command is executed on Oracle SQL database through "django.db.backends.oracle" driver. Unfortunately I'm not able to find a