Re: How can i transmit an objects in list?

2012-06-14 Thread huseyin yilmaz
You are probably getting this error because when you generate your list from categories. you are adding sub categories as list. so your list will be like following [cat1,cat2,cat3,[subcat1,subcat2],[subcat3,subcat4]] I think you want to use list.extend(BuildList(category.childrens.all())) so y

Re: django 1.4 : gunicorn can't find static files. settings option

2012-05-15 Thread huseyin yilmaz
For development, you could add this to main urls.py like this. (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), But for production use your web server to serve static files. At least this is how I solved it. I hope that helps. O

Re: collectstatic missing on Linux

2012-01-09 Thread huseyin yilmaz
This is why linux is the best os. If anything goes wrong, you can blame it on linux :) 1) make sure you are really using django1.4a in server (from django import VERSION). maybe you installed multiple versions of django and using the wrong one (you might have 1.2.x on system and 1.4a on virtualenv

Re: Interface implementation in python

2012-01-04 Thread huseyin yilmaz
hat design mistake. but I don't get this error in zope version. On Jan 4, 2:49 pm, Thomas Weholt wrote: > He probably meant zope.interface :-) > > Regards, > Thomas > > > > > > > > > > On Wed, Jan 4, 2012 at 1:47 PM, huseyin yilmaz > wrote: > &g

Re: Interface implementation in python

2012-01-04 Thread huseyin yilmaz
Could you direct me to an example (or documentation). I could not find any source about zone.interface. On Jan 4, 2:17 pm, Donald Stufft wrote: > Why not use zone.interface > > > > > > > > On Wednesday, January 4, 2012 at 7:07 AM, huseyin yilmaz wrote: > > Hi eve

Interface implementation in python

2012-01-04 Thread huseyin yilmaz
Hi everybody, I want to implement interface functionality in python. I wrote following sample code https://gist.github.com/1559689 Here I use an abc as an interface. Couple of my models are implementing this interface and one of my consumer model is using those models. In this implementation, I

Re: How to add a ManyToManyField "dynamically" to a model?

2011-12-20 Thread huseyin yilmaz
Generic forign key might help you https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#django.contrib.contenttypes.generic.GenericForeignKey You might not even need a metadata here.(The metadata you need looks like ContentType model) Just do class GenericManyToManyDetail(Model) ct1 = .

Re: Urgent: django app got internal error: TemplateDoesNotExist: 500.html

2011-12-19 Thread huseyin yilmaz
It looks to me like you do not have 500.html file in your base template directory. If you have a server error in production mode (DEBUG = False), django will show 500.html to users. So users will not see actual error message. But you will get that message by email. Since you do not have 500.html it

Re: Which IDE should I use for Django?

2011-12-19 Thread huseyin yilmaz
I was going to say emacs, but since you also use windows, Aptana would be a better fit. On Dec 19, 12:34 pm, Alec Taylor wrote: > I'm looking for a Django IDE which incorporates the following features: > - Syntax-highlighting > - Projects (all code file of the project shown separated by director

Re: slow function

2011-12-05 Thread huseyin yilmaz
With select related, hole queries can be ommitted but this time for every score object one hole object will be created. so there will be alot of hole objects. On Dec 5, 12:18 pm, Håkon Erichsen wrote: > 2011/12/5 kenneth gonsalves > > >  The code looks simple to me, but to analyse 10,000 rounds

Re: slow function

2011-12-05 Thread huseyin yilmaz
First of all You are queryin everything that you have on database for this view and making django model objects from those. For a large db this will run very slow and for larger dbs, it will throw memmory exception. Try something like this: for hole in Hole.objects.filter(tee_course=club): ...

Re: Pointing to Memcached on Remote Server

2011-12-03 Thread huseyin yilmaz
Also check memcached configuration (/etc/memcached.conf) from this file,you can limit IP addresses that memcached listening to here is a configuration parameter that you might have # Specify which IP address to listen on. The default is to listen on all IP addresses # This parameter is one of the