Re: Need your advices to optimize when annotate foreign key

2015-03-16 Thread tkdchen
On Monday, March 16, 2015 at 5:19:38 PM UTC+8, Sardor Muminov wrote: > > > > Hello there, > > > I am trying to perform aggregation from all objects which have one foreign > key. > > > These are my models: > > ... > > class Post(models.Model): > id = models.CharField(max_length=255, primary_k

Re: Why is list(Model.objects.all()) 10x slower against an Oracle database as compared to Postgres?

2015-03-26 Thread tkdchen
On Wednesday, March 25, 2015 at 4:49:48 AM UTC+8, Daniel Porter wrote: > > I have an application that we run locally against a postgres database but > our dev/test/prod servers all run Oracle. > > The command list(Person.objects.all()) runs remarkably faster against my > local Postgresql databa

Re: Best way to use a 'all' QuerySet as a dict with id first

2014-09-27 Thread tkdchen
On Saturday, September 27, 2014 9:06:58 PM UTC+8, aRkadeFR wrote: > > @James Brewer: > If I change my code, I can have this user_ids list. > btw, it's filter and not get if you're searching multiple objects (the > user_ids). > > @Alejandro Varas G.: > That doesn't change the fact that 'User.

Re: 求解答 说是找不到'hello', 我看Python的搜索path 也对啊 附件是程序 我是第一次接触Django

2014-11-11 Thread tkdchen
这不是Django的问题,你先把Python搞明白。 On Sunday, November 9, 2014 11:29:58 PM UTC+8, zhoumin...@gmail.com wrote: > > NameError at / > > name 'hello' is not defined > > Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: > 1.7.1 Exception Type: NameError Exception Value: > > name 'hell

Re: 求解答 说是找不到'hello', 我看Python的搜索path 也对啊 附件是程序 我是第一次接触Django

2014-11-11 Thread tkdchen
这不是Django的问题。你先把Python搞明白。 On Sunday, November 9, 2014 11:29:58 PM UTC+8, zhoumin...@gmail.com wrote: > > NameError at / > > name 'hello' is not defined > > Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: > 1.7.1 Exception Type: NameError Exception Value: > > name 'hell