QuerySet and subselect

2012-02-09 Thread Олег Корсак
Hello. I have a model named MyModel and it has its own table named my_model (as an example). Is it possible to write ORM-way request to be same as this SQL: SELECT mo.* FROM (SELECT mi.* FROM my_model mi) AS mo WHERE mi.a=mo.a AND mi.b=mo.b; There is also an agregation+group by statements in

get latest records for each group

2011-09-18 Thread Олег Корсак
Hi there. I have such SQL to fetch latest records for each group: SELECT tp.id,tp.team_id,tp.player_id FROM ( SELECT tps.team_id,tps.player_id,MAX(tps.dt_from) AS dt_from FROM team_players tps GROUP BY tps.team_id,tps.player_id ) AS tps JOIN team_players tp

caching ajax json (post)

2011-05-27 Thread Олег Корсак
Hello. Is there a way to cache ajax json responce after post request like after get? Thanks. signature.asc Description: OpenPGP digital signature

Re: oAuth 2.0

2011-03-03 Thread Олег Корсак
t I dont know > of any example django code (Someone else might). > > > _Mick > > On Thursday, March 3, 2011 at 2:51 AM, Олег Корсак wrote: > >> Yes. But I'm stuck with first step... As I understood - first of all I >> need to ask for request_token from my

Re: oAuth 2.0

2011-03-03 Thread Олег Корсак
oauth2) there is a good example in > the "Logging into Django w/ Twitter" section. > > > > > _Mick > On Wednesday, March 2, 2011 at 2:36 PM, Олег Корсак wrote: > > hello. Is there any tutorial/example about oAuth 2.0 built into Django > > and through

oAuth 2.0

2011-03-02 Thread Олег Корсак
hello. Is there any tutorial/example about oAuth 2.0 built into Django and through python-oauth2-1.2.1 ? thanks signature.asc Description: OpenPGP digital signature

stop caching json response

2011-02-20 Thread Олег Корсак
Hello. I have memcached mw enabled. And I can see that response is cached in memcached. I want to stop caching that. How is it possible to do? Thanks def do_something(request): return HttpResponse('yoyoyo23', content_type = 'application/javascript; charset=utf8') signature.asc

model best practice

2011-01-13 Thread Олег Корсак
hello. My models.py file became very big and actually I can divide that app for 2-3 different apps. But the problem is that almost all models are related to one model which is common and will be in different app. Is it still a good idea to divide into different apps and make import from external

apps, views and templates

2010-12-21 Thread Олег Корсак
hello. I have a question about using multiple apps on the same page (template). Lets imagine a template with two blocks {% block left_side %}{% endblock %} and {% block right_side %}{% endblock %} in left_side block there is a voting app for example and in the right_side block there is a

Re: mod_wsgi + mod_php = segmentation fault

2010-10-04 Thread Олег Корсак
no mod_python, only mod_wsgi and mod_php 04.10.2010 02:33, Srik пишет: > Is mod_python enabled by any chance ?. Running both mod_python & > mod_wsgi can cause similar errors sometimes. > > On Oct 3, 3:54 pm, Олег Корсак <kamikaze.is.waiting@gmail.com> > wrote: &

apache reload

2010-10-03 Thread Олег Корсак
Hello. I'm using mod_wsgi 3.3 + apache 2.2.16 on Gentoo Linux box. Is it possible to make apache kinda "reload"/"re-read"/"re-compile" python files from my django code every time they are changed? Thanks signature.asc Description: OpenPGP digital signature

mod_wsgi + mod_php = segmentation fault

2010-10-03 Thread Олег Корсак
Hello. I'm using apache Apache/2.2.16 (Unix) + mpm_worker on my ~amd64 Gentoo Linux box. It has mod_php enabled and all my existing php projects work fine (with mysql too). When I'm enabling mod_wsgi in apache config and trying to run simple empty django project - I'm getting 500 Internal Server

Re: DjangoCon 2011

2010-09-27 Thread Олег Корсак
Make conference in eastern europe :) - Исходное сообщение - > I'd just like to briefly report back on the inquiries Nancy and I have > been making into East coast venues for DjangoCon 2011. This is not a > final answer, simply reassurance that things have actually been > happening. > >

Re: Мобильная версия

2010-08-26 Thread Олег Корсак
English? 27.08.2010 04:42, Vanger - irk пишет: > не могу понять, как лучше реализовать определение того, что человек > зашел сейчас с мобилы, и что мне нужно подсунуть ему мобильную > версию ? > Может быть кто-то уже реализовывал эти моменты? > signature.asc Description: OpenPGP digital