Re: Slow query on MySQL

2011-03-22 Thread smallfish xy
hi, you can try split the in statement, with less with "in". forums = [1, 2, 3, 4, 5] r = [] for f in forums : r.append(Post.objects.filter(topic__forum=f.id) return r perhaps try to use the pure sql statement. -- blog: http://chenxiaoyu.org On Wed, Mar 23, 2011 at 8:22 AM, Brian Neal

Re: django using wrong python???

2010-12-30 Thread smallfish
you can try ln -s python2.6 to default python, and then modify the yum script to python2.4. -- blog: http://chenxiaoyu.org On Thu, Dec 30, 2010 at 10:53 PM, ozgur yilmaz wrote: > I have Centos, and it comes with python2.4(sorry, not 2.5). I installed > python2.6 and django

Re: Installing Django on Ubuntu

2010-11-15 Thread smallfish
0 at 5:09 PM, kelp <kelp...@gmail.com> wrote: > How do I do that? Will this just reroute my Django path to the one in > my /home/username/ directory? > > On Nov 15, 12:56 am, smallfish <smallfish...@gmail.com> wrote: > > add your django path to sys.path variable, add fi

Re: Installing Django on Ubuntu

2010-11-15 Thread smallfish
add your django path to sys.path variable, add first. -- blog: http://chenxiaoyu.org twitter: @nnfish psql: http://psql.info On Mon, Nov 15, 2010 at 4:54 PM, kelp wrote: > Hello, > So I have downloaded Django and put the folder into my

Re: Language problem with date based generic views

2010-10-12 Thread smallfish
\w not include *, try use (.*) -- blog: http://chenxiaoyu.org twitter: @nnfish On Tue, Oct 12, 2010 at 10:29 PM, mf wrote: > I've changed the language-code from en-us to es-ar and the url's began > to fail. > Example: When I click in "Agosto

Re: MySQLdb on Ubuntu 10.10

2010-10-12 Thread smallfish
perhaps missing mysql-client libary. try use aptitude to install it, don't use easy_install good luck -- blog: http://chenxiaoyu.org twitter: @nnfish On Tue, Oct 12, 2010 at 5:52 PM, Will McGugan wrote: > Hi, > > I've just upgraded my

Re: question about django url

2010-10-09 Thread smallfish
like this: http://127.0.0.1:8000/xxx/123243-1-2-3-0/ urls.py (r"^xxx/(\d+)-([0-4])-([0-4])-([0-4])-([0-4])/$", "polls.views.hello"), polls/views.py def hello(request, s1, s2, s3, s4, s5): return HttpResponse("%s - %s - %s - %s - %s" % (s1, s2, s3, s4, s5)) -- blog: