Re: votes/score

2013-11-18 Thread Leonardo Giordani
Érico, it is not really clear to me what you are trying to accomplish. That HTML in MYVALUES is a try to show that line in the dropdown? And why is "{{form|safe}}" there? May you please decribe what you would like to obtain? Cheers, Leo Leonardo Giordani Author of The Digital Cat

Re: order_by result of sum of fields computed from an annotate

2013-11-18 Thread Leonardo Giordani
May you please post the code of Book and Author models? Thanks Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page- My Coderwall profile

Re: Error while deploying django with mod wsgi

2013-11-18 Thread Leonardo Giordani
Hi Sebastian, it seems that you are experiencing a name clash or similar. email.quoprimime is included in Python 2.6 (see here http://hg.python.org/cpython/file/3edf679917ba/Lib/email) so if you find it in /usr/lib/python2.6/email/quoprimime.py then you are probably masking the name "email" with s

django caching problem

2013-11-18 Thread Harjot Mann
One of my colleagues has made a function to control caching in django. Here is the function code. I want to know the views of all of you. Here is the function: http://tny.cz/3b7f6040 Use the decorator @stop_caching before your function. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ D

Filter ForeignKey values in model's admin view

2013-11-18 Thread Michal Ludvig
Hi I've got two Django models: Contact and Group, where Group has two fields: contact and contact_primary linked to Contact. Like this: |class Group(models.Model): name = models.CharField(max_length=200) contacts = models.ManyToManyField(Contact) contact_primary = models.ForeignKey(Co

Re: Streaming images with HttpResponse?

2013-11-18 Thread Brian Schott
What are you trying to do?  Typical approach would be to use Javascript to pull the images.  Take a look at dajaxice.   — Sent from Mailbox for iPhone On Mon, Nov 18, 2013 at 1:57 PM, Alex Karargyris wrote: > So thanks to Simon I was able to make this work. Here is the code for those > who m

Re: Streaming images with HttpResponse?

2013-11-18 Thread Alex Karargyris
So thanks to Simon I was able to make this work. Here is the code for those who might be interested: yield "" yield '' yield "\n" rval, frame = settings.CAP.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imwrite('media/image.jpeg', gray, [int(cv2.IMWRITE_JP

Re: Signal does not run

2013-11-18 Thread Ricardo
resolved. I was not recording the other signs, for this reason he was never called. transaction_canceled.connect(on_canceled) transaction_waiting.connect(on_waiting) ... Thanks Em segunda-feira, 18 de novembro de 2013 15h38min54s UTC-2, Ricardo escreveu: > > Hi. I have a problem in the signal,

Error while deploying django with mod wsgi

2013-11-18 Thread Sebastian Clemens
Hello, here's my traceback, I use a virtualenv running django. [Mon Nov 18 17:40:03 2013] [error] [client 79.205.192.140] ServerName: > 'sebastian-clemens.de' > [Mon Nov 18 17:40:03 2013] [error] [client 79.205.192.140] DocumentRoot: > '/var/www/vhosts/sebastian-clemens.de/httpdocs' > [Mon No

Signal does not run

2013-11-18 Thread Ricardo Kamada
Hi. I have a problem in the signal, because it fails to run. The print "Hello word" is not displayed. Can anyone help me identify my mistake? Thanks from djpg.signals import transaction_paid def on_paid(sender, **kwargs): transaction = kwargs.pop('transaction') ref = transaction['reference'] print

Re: override_settings decoration of non-test class function

2013-11-18 Thread Simon Charette
Hi Daniel! Prior to Django 1.6 (552a90b444) override_settings couldn't be safely nested . Could you try running your example against this version and report back her

Re: Streaming images with HttpResponse?

2013-11-18 Thread Alex Karargyris
Dear all, Thank you for the help. I managed to setup StreamingHttpResponse to read the images from the media folder. However I believe that there is a syntax error with html code . It doesn't display the image. Any help? I am attaching the code below.Thanks in advance! def stream_response_gene

Strange import error with GeoIP

2013-11-18 Thread Karim
Hi all, I have one website that suddenly and often show me an import error. Django Version: 1.5.5 Exception Type: ImportError Exception Value : cannot import name GeoIP The GeoIP works if I start a python manage.py shell and in fact the problem is not always present, it's enough for me reload the