backend-specific escaping

2005-11-28 Thread jws
My ticket was closed - http://code.djangoproject.com/ticket/470 I'd like to clarify the reasoning, since I think it pertains to a larger issue. My understanding of Adrian's comment is that there currently is no infrastructure in Django to escape special characters in strings in a way that is spec

Random Tag

2005-11-28 Thread Tom Tobin
I'd be interested in feedback on ticket #919, which implements a "random" tag which parallels the functionality of the random filter. I'd also be curious as to where the best place would be to implement a possible helper class for the weighted random option, as I was considering making the weight

New Position at Naples Daily News using Django

2005-11-28 Thread Eric Moritz
One of the most respected and award-winning newspaper Web teams in the world has moved to Florida and is looking for an experienced server-side Web developer. NDN Productions -- the online and new media publishing division of the Naples Daily News -- is looking for a full-time Python programmer t

Re: i18n for JavaScript

2005-11-28 Thread Petar Marić
On 11/28/05, hugo <[EMAIL PROTECTED]> wrote: > http://media.rfc1437.de/testi18n-sr.html > this gives you a test page that uses the 'sr' (serbian) catalog. > Because they have interesting pluraliziation rules. And because I got > pluralization working (actually it's dead simple, as the C-expression

cache_page decorator

2005-11-28 Thread Kevin
I was trying to use the 2.4 syntax to add a cache decorator to my view function as described in the documentation, eg: @cache_page(60 * 15) def slashdot_this(request): ... But, the way that that django.utils.decorators.decorator_from_middleware is implemented, it doesn't seem to able to handl

Re: i18n for JavaScript

2005-11-28 Thread hugo
>Comments? Volunteers for writing the string interpolation function >(preferably using python named parameter syntax) or the >plural-form-to-javacript-compiler? :-) Ok, looks like I mostly talk to myself ;-) http://media.rfc1437.de/testi18n-sr.html this gives you a test page that uses the 'sr'

Re: i18n for JavaScript

2005-11-28 Thread hugo
>4) write gettext in JavaScript. This could be done by converting the >existing django message files to dynamic javascript Ok, to get a feel for my current favorite way to do it, I hacked up a very crude version that currently doesn't handle any pluralization that diverts from the one used in eng

Re: i18n for JavaScript

2005-11-28 Thread hugo
>I never saw b) done using algorithms. I would assume it is possible but >probably it should be written from scratch. But proper pluralization would be a requirement. Improper pluralization is a pain - and gettext already handles it quite nicely, so we should try to get a solution that gives us t

Re: i18n for JavaScript

2005-11-28 Thread Eugene Lazutkin
Inline. "hugo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 2) offline generating javascript files for each language by running > them through the template engine (and using translation tags). This has > the benefit that javascript files can still be in the media server, but >

Re: ANN: new-admin branch merged to trunk

2005-11-28 Thread Eugene Lazutkin
There is a ticket pending: http://code.djangoproject.com/ticket/914 "mortenbagai" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi, > > I encountered a change, which I think must be a consequence of the > new-admin merge. It seems that the "js" admin option - given to link > j

Re: ANN: new-admin branch merged to trunk

2005-11-28 Thread mortenbagai
Hi, I encountered a change, which I think must be a consequence of the new-admin merge. It seems that the "js" admin option - given to link javascript files to the admin screen for the model object - now assumes the paths given are relative to the ADMIN_MEDIA_PREFIX whereas before it didn't. For

Re: i18n for JavaScript

2005-11-28 Thread Steven Armstrong
On 11/28/05 18:25, hugo wrote: My first instinct in this sort of case is to find out what others are doing, i.e. Dojo folks, RoR, TG, etc. That's what I did. Zilch. Nada. Zero. Nothing. Seems nobody ever cared about a proper solution to JavaScript and i18n. What they do are hacks, if they do s

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Maniac
Amit Upadhyay wrote: Consider http://code.djangoproject.com/ticket/398 for example. It looks like a good idea to me, patch is there, so is some discussion and suggestions, but activities ended 3 months back and from ticket there seems to be no idea if its being considered or what. But publi

Re: i18n for JavaScript

2005-11-28 Thread hugo
>My first instinct in this sort of case is to find out what others are doing, >i.e. Dojo folks, RoR, TG, etc. That's what I did. Zilch. Nada. Zero. Nothing. Seems nobody ever cared about a proper solution to JavaScript and i18n. What they do are hacks, if they do something at all. Some of those h

Re: i18n for JavaScript

2005-11-28 Thread hugo
>Another idea would be to translate the strings in the templates and >pass the translated strings to the JavaScript. This would make the >JavaScript not as "unobtrusive," but it's a compromise. But with dynamically generated content it will be rather weird - your code will be sprinkled with strin

Re: i18n for JavaScript

2005-11-28 Thread hugo
Hi, >We have the problem that some strings are in the JavaScript code for >the admin. That way those strings are not translateable for us with the >current situation. > >There are several ideas on how to solve this: I actually forgot one: 5) JavaScript uses XHR to fetch stringdata from Django.

Re: i18n for JavaScript

2005-11-28 Thread David Ascher
On 11/28/05, hugo <[EMAIL PROTECTED]> wrote: There are several ideas on how to solve this:All of which seem like they would apply beyond Django, no?My first instinct in this sort of case is to find out what others are doing, i.e. Dojo folks, RoR, TG, etc. --david

Re: i18n for JavaScript

2005-11-28 Thread Adrian Holovaty
On 11/28/05, hugo <[EMAIL PROTECTED]> wrote: > We have the problem that some strings are in the JavaScript code for > the admin. That way those strings are not translateable for us with the > current situation. Another idea would be to translate the strings in the templates and pass the translate

i18n for JavaScript

2005-11-28 Thread hugo
Hi, since this is a more developer oriented content, I post it to django-developers instead of django-i18n. This is ticket #945. We have the problem that some strings are in the JavaScript code for the admin. That way those strings are not translateable for us with the current situation. There

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote:> Just that I felt dropping a mail on the list gives a little more visibility> and opportunity to get feedbacks, than just filing a ticket, which only a > handful of core-thus-busy developers moni

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Tom Tobin
On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > Just that I felt dropping a mail on the list gives a little more visibility > and opportunity to get feedbacks, than just filing a ticket, which only a > handful of core-thus-busy developers monitor. Hmm, I actually have the opposite impress

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: > Done: http://code.djangoproject.com/ticket/949Thanks!  The Trac makes it much easier to keep, well, *track* ofwhat's going on.  :-) :-) Just that I felt dropping a mail on the list gives a little more visibility and opportunity to get feedbacks, t

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Tom Tobin
On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: > > Please submit patches (along with tickets) to Django's Trac at > > http://code.djangoproject.com/ > > Done: http://code.djangoproject.com/ticket/949 Thanks! The Trac makes it much easier

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
On 11/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote:> <% include template_name %> includes the named template which is like> get_template of the Python API for loading templates, for consistancy we > should have a comma seperated template list simi

Re: <% include %> should support select_template like sytax too

2005-11-28 Thread Tom Tobin
On 11/28/05, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > <% include template_name %> includes the named template which is like > get_template of the Python API for loading templates, for consistancy we > should have a comma seperated template list similer to select_template. > (Untested) Patch atta

<% include %> should support select_template like sytax too

2005-11-28 Thread Amit Upadhyay
Hi,<% include template_name %> includes the named template which is like get_template of the Python API for loading templates, for consistancy we should have a comma seperated template list similer to select_template. (Untested) Patch attached.-- Amit UpadhyayBlog: http://www.rootshell.be/~upadhy