Memcache, errors logged to apache

2009-01-27 Thread Michael Newman
Using cmemcache .95 I am getting the following errors in the apache logs: [fa...@1233073307.022758] mcm_fetch_cmd():1156: memcache(4) protocol error: protocol, expected a response [fa...@1233073307.030416] mcm_get_line():1544: memcache(4) protocol error: no \r before \n It seems to be occurring

Re: django.core.mail - DEFAULT_FROM_EMAIL not employed

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 10:52 AM, funkazio wrote: > > Hi, > I made several tests using 'django.core.mail' with the 'mail_managers > ()' function. > The doc for this function is (around) here: http://docs.djangoproject.com/en/dev/topics/email/#django.core.mail.mail_admins

django.core.mail - DEFAULT_FROM_EMAIL not employed

2009-01-27 Thread funkazio
Hi, I made several tests using 'django.core.mail' with the 'mail_managers ()' function. OK when using GMAIL smtp with these settings: EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = '587' EMAIL_HOST_USER = 'my.valid.acco...@gmail.com' EMAIL_HOST_PASSWORD = 'gmail.pwd' EMAIL_USE_TLS = True

Re: Django imagefield at development server

2009-01-27 Thread felix
no problem uploading using the dev server no idea. you didn't leave a pdb in your code, did you ? what is the output if any in the shell ? On Tue, Jan 27, 2009 at 2:58 PM, Akhmat Safrudin wrote: > > dear list, > i am a noob, > i just starting a project, then

how to: munge words and numbers into a URL, then reverse it ?

2009-01-27 Thread felix
there is some hashing function or combination of URL encoding that can do this : given some parameters : 'music' 'artist' 32L 2L 100 100 ( artist id 32, 2nd picture, dimensions 100 x 100 ) I wish to generate a fake filename eg: tartan_ba6e5e06e794f1368ed3ec20b4594eec.png and then be able to

Re: Convert iso-8859-1 queryset to utf-8

2009-01-27 Thread Anders
Thanks! This method worked fine for me: from django.http import HttpResponse from django.template.loader import render_to_string def render_to_xmlutf8(template, isodata): rendered = render_to_string(template, isodata) result = rendered.encode('utf-8') return HttpResponse(result,

Re: Embed HTML snippets through django

2009-01-27 Thread DrKayBee
Thanks! Thanks helps. On Jan 26, 10:15 pm, Malcolm Tredinnick wrote: > On Mon, 2009-01-26 at 19:27 -0800, DrKayBee wrote: > > Hi, > > I am creating a small website, where I would like to provide users > > with a database field (through admin) where they can enter a

Re: Splitting a NullBooleanField in a template

2009-01-27 Thread chewynougat
After having a closer look in django, it seems that the RadioFieldRenderer that renders the radio buttons, renders the entire set as a single string, therefore it is not possible to split these fields in the template (using django) - if anyone else is interested! Thanks anyway. On Jan 27, 2:19 

Re: trouble with yesno to generate images

2009-01-27 Thread Almost George
On Jan 26, 4:52 pm, Margie wrote: > Thanks very much, autoescape did the trick, here is the result for > anyone interested: > >         {% autoescape off %} >         {{ task.done|yesno:" \" alt=\"False\" />, \"False\" />" }} >         {% endautoescape %} > > Margie

Re: Unicode issue with Oracle

2009-01-27 Thread Karen Tracey
On Tue, Jan 27, 2009 at 5:44 AM, João Olavo Baião de Vasconcelos < joaool...@gmail.com> wrote: > Dear all, > > I'm using Django 1.0.2 with Oracle 9i, cx_Oracle 5.0, Oracle Instantclient > 10.2.0.4 and CentOS 5.2. > > When I access the admin page, after login, the following error happens: > >

Re: Splitting a NullBooleanField in a template

2009-01-27 Thread chewynougat
After having a closer look in django, it seems that the RadioFieldRenderer that renders the radio buttons, renders the entire set as a single string, therefore it is not possible to split these fields in the template (using django) - if anyone else is interested! Thanks anyway. On Jan 27, 2:19 

Re: Splitting a NullBooleanField in a template

2009-01-27 Thread chewynougat
After having a closer look in django, it seems that the RadioFieldRenderer that renders the radio buttons, renders the entire set as a single string, therefore it is not possible to split these fields in the template (using django) - if anyone else is interested! Thanks anyway. On Jan 27, 2:19 

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Eric Abrahamsen
On Jan 27, 2009, at 9:45 PM, Rama Vadakattu wrote: > > Eric, > can you please show me the code snippet of specifying a logfile in > settings.py. Sure, here's something I use to keep a separate log of requests to an RSS feed: settings.py ### LOG_FILE = '/path/to/log/file.log' feeds.py

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread bruno desthuilliers
On 27 jan, 11:31, Rama wrote: > please look at the below logging.conf file.http://dpaste.com/hold/113443/ > > For RotatingFileHandler [handler_rfileHandler]  i have hard coded the log > file path as "/home/rama/djangoprojects/doloto/logs/logs.txt" > how to avoid such

Re: JOB OPPORTUNITY IN LEICESTERSHIRE, ENGLAND

2009-01-27 Thread Juan Hernandez
djangogigs.com On Tue, Jan 27, 2009 at 9:27 AM, l...@hiveonline.co.uk < l...@hiveonline.co.uk> wrote: > > We are a small, rapidly expanding, company near Loughborough in > Leicestershire and are looking for people who are experienced in using > Django to join our development team. You will need

JOB OPPORTUNITY IN LEICESTERSHIRE, ENGLAND

2009-01-27 Thread l...@hiveonline.co.uk
We are a small, rapidly expanding, company near Loughborough in Leicestershire and are looking for people who are experienced in using Django to join our development team. You will need to live within reach of the office. If interested in learning more, send me your CV.

Django imagefield at development server

2009-01-27 Thread Akhmat Safrudin
dear list, i am a noob, i just starting a project, then create app and add some models, in the model there is an ImageField, at the admin area i can't insert record, the browser status is "waiting for localhost" is django development server can upload file/image ? i have completely read model

Re: Multithreaded development server

2009-01-27 Thread Almad
On Jan 27, 3:21 pm, Almad wrote: > On Jan 26, 1:19 am, Russell Keith-Magee > wrote: > i guess PHP users are our target group. Sorry, that was too bitter, unneccessary, offensive and intended to be removed by my self-censoring filter. Almad

Re: Multithreaded development server

2009-01-27 Thread Almad
On Jan 26, 1:19 am, Russell Keith-Magee wrote: > On Sun, Jan 25, 2009 at 10:45 PM,Almad wrote: > > I still feel kinda weird that I must hack around Django so much to > > make basic testing things working :-]]] > > Let's be clear here - the "basic testing"

Splitting a NullBooleanField in a template

2009-01-27 Thread chewynougat
I am using a NullBooleanField called bequeath in a form wizard with a RadioSelect widget with two choices. I would like to place the two radio buttons in a customised layout in the template but do not know how. Currently, I can only layout the buttons next to each other by writing:

Re: How to change python version in ubuntu???

2009-01-27 Thread waylan
On Jan 26, 7:28 pm, DragonSlayre wrote: > Ok, well I reinstalled ubuntu. > > It'd still be good to know how to change python versions easily, if > anybody knows how to do this - it seems like it's not documented > anywhere :( A little while back I wrote up how I installed

Re: Multithreaded development server

2009-01-27 Thread Almad
On Jan 26, 6:21 pm, birkin wrote: > On Jan 24, 7:08 pm,Almad wrote: > > A very simple solution in > this edge-case of mine is to simply start up an additional terminal > window and execute the runserver command again Don't You have a race condition where

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Rama Vadakattu
Eric, can you please show me the code snippet of specifying a logfile in settings.py. On Jan 27, 6:37 pm, Eric Abrahamsen wrote: > On Jan 27, 2009, at 9:28 PM, Thomas Guettler wrote: > > > > > Rama schrieb: > >> please look at the below logging.conf file. > >> ... > >> can any

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Eric Abrahamsen
On Jan 27, 2009, at 9:28 PM, Thomas Guettler wrote: > > Rama schrieb: >> please look at the below logging.conf file. >> ... >> can any one guide me on how to avoid hardcoding of log file path ? >> >> > Hi, > > I am not a logging expert, maybe there is a solution, but if you > do your setup

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Thomas Guettler
Rama schrieb: > please look at the below logging.conf file. > ... > can any one guide me on how to avoid hardcoding of log file path ? > > Hi, I am not a logging expert, maybe there is a solution, but if you do your setup with python code, you can use e.g. os.environ['HOME'] or settings.FOO.

Re: Django Production Setup / Threading / Fcgi

2009-01-27 Thread Graham Dumpleton
On Jan 27, 8:20 pm, David wrote: > Hello, > > iam new to django and in the phase of researching django production features. > Iam planing to run django as fcgi behind a thin webserver. Can some point me > out a good read or resource to find more about this topics. Iam

@cache_control() and @never_cache not working

2009-01-27 Thread BluMarble
Hi, I'm pretty new to django so please bear with me. The Server: lighttpd python 2.5 django 0.96 The Code: >>> settings.py # Cache settings CACHE_MIDDLEWARE_SECONDS = 5*60 CACHE_BACKEND = 'file:///var/www/data/some_project/tmp/file_cache/? timeout=300_entries=500' # Middleware

Django Production Setup / Threading / Fcgi

2009-01-27 Thread David
Hello, iam new to django and in the phase of researching django production features. Iam planing to run django as fcgi behind a thin webserver. Can some point me out a good read or resource to find more about this topics. Iam specially interested in the problem about scaling, regarding

Unicode issue with Oracle

2009-01-27 Thread João Olavo Baião de Vasconcelos
Dear all, I'm using Django 1.0.2 with Oracle 9i, cx_Oracle 5.0, Oracle Instantclient 10.2.0.4 and CentOS 5.2. When I access the admin page, after login, the following error happens: *'ascii' codec can't encode characters in position 0-42: ordinal not in range(128)* *Unicode error hint* *The

Re: How to extend queryset iterator?

2009-01-27 Thread Enrico
Very nice Malcolm! It works like a charm! I was confused about how to extend an iterator, but I can surely find my own way from here. Thanks for the help! Best regards, Enrico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Rama
please look at the below logging.conf file. http://dpaste.com/hold/113443/ For RotatingFileHandler [handler_rfileHandler] i have hard coded the log file path as "/home/rama/djangoprojects/doloto/logs/logs.txt" how to avoid such hard coding of log file path in the logging.conf file. 1) i have

Re: I want to change widget in admin

2009-01-27 Thread Daniel Roseman
On Jan 27, 10:54 am, Mirat Can Bayrak wrote: > I am drown in documentation. I want to do simple thing. There is a > ShortDescription model in my app, which has string = > models.CharField(max_length=300), but i want to show it as in my > admin panel. > > I tried

reverse foreignkey "add" method using multiple INSERTs

2009-01-27 Thread Andrew Ingram
Hi All, I'm using something along the following lines to bulk add a bunch of objects to a model's reverse foreignkey relationship: foo.bar_set.add(*bars) where bars is a list of Bar objects. I've noticed that Django is generating a new INSERT query for each object in the list rather than just

I want to change widget in admin

2009-01-27 Thread Mirat Can Bayrak
I am drown in documentation. I want to do simple thing. There is a ShortDescription model in my app, which has string = models.CharField(max_length=300), but i want to show it as in my admin panel. I tried some, here class ShortDescription(models.Model): product =

Re: template: writing "\u20ac 20.000" fails

2009-01-27 Thread SanPy
Thanks a lot, Malcolm, You got me on the right track, I just needed to escape the string, like this: var prices=[{% for price in prices %}[{{ price.0 }}, '{{ price.1| escape }}']{% if not forloop.last %},{% endif %}{% endfor %}]; I tried the `escapejs` filter. That didn't work. Then I tried

Re: GROUP BY

2009-01-27 Thread Glenn Maynard
On Jan 27, 2:50 am, Malcolm Tredinnick wrote: > > I don't care if it takes more than one line, though there is, in > > fact :), a big difference between taking more than one line and having > > to bypass the public API. > > Only semantically, when you're trying to

<    1   2