I18N: date (Python + HTML + Javascript)

2008-05-15 Thread Tourneur Henry-Nicolas
Hi, I would like to be able to do a clean I18N with date format. The problem is that the date format (dd/mm/) is used in javascript (for a date picker), in html (with the template tag now, for its format too) and in python, to parse a date and transform it into Python date using

Re: Problem with SQL Query

2008-05-08 Thread Tourneur Henry-Nicolas
Sorry, the python indentation was wrong: query = SiteEquipment.objects.extra(tables=['sites_site']) if asset != '': query |= SiteEquipment.objects.filter(asset__icontains=asset) if mark_sel != -1: query | =SiteEquipment.objects.filter(equipment__mark__id=mark_sel) if

Problem with SQL Query

2008-05-08 Thread Tourneur Henry-Nicolas
Hi, I'm trying to execute a "special" request. The request is based on multiple OR statement. I create the querysets via objects.filter and, at the end there is an extra statement. I do not know how to remove this extra() call because I have to do a concatenation (the || part, in SQL is a

Problem with static content + Apache / FastCGI

2008-04-06 Thread Tourneur Henry-Nicolas
to site_media are not handled any more. Instead, apache try to read /var/www/site_media which doesn't exist. I'm running django 0.96. If you have an idea this would be really great to help me. -- Tourneur Henry-Nicolas --~--~-~--~~~---~--~~ You received this message

Model unique case insensitive

2008-03-31 Thread Tourneur Henry-Nicolas
Hello all, I would like to make a field in a model unique but in a insenstitive way. Eg: Car(name='CAR'), Car(name='car') The second car should be blocked. Any idea ? TIA. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Howto execute custom SQL from the command line

2008-03-27 Thread Tourneur Henry-Nicolas
ll > > I prefer the second way because I have to stay database independant. The problem is (with pgsql at least) that when I type manage.py dbshell it asks me for the password even if the password is present in me settings.py. > --- Amit > > * Tourneur Henry-Nicolas <[EMAIL

Howto execute custom SQL from the command line

2008-03-25 Thread Tourneur Henry-Nicolas
Hello, At the installation stage of the software (Django bases, of course) I'm developing, I have to insert data in a database. Is there any easy way to tell django to execute the SQL directives contained in a .sql file ? I tried using manage.py but I don't know the good options. So I would