>
> I've created a templatetag to show a AJAX confirm dialog with is used
> like this:
>
> {% modalconfirm "delete_small_photo" "Delete" "Are you sure you want
> to delete this user's small photo?" "delete_smallphoto" %}
>
> The strings should be translated, how can this be done since
>
> {% modal
sure. why not?
> So should i do like this:
>
> def modalconfirm(context, name, caption, question, yesfunction,
> nofunction=None):
> """
> Shows a modal confirm dialog
> """
>
> return {
> 'modal_name': name,
> 'modal_caption': _(caption),
> 'modal_questio
does same strings extracted by trans in templates?
> Just tested, using
> from django.utils.translation import ugettext as _
> pybabel does not extract the strings.
>
> any other ideias, please.
>
> Luis
>
--~--~-~--~~~---~--~~
You received this message because
ONFIRM' %}
... or something similar
but I think must be better solution
> Yes, if I use {%trans "string"%} in template it gets added to .pot
>
> The problem is that _(variable) doesn't work, only _("string") works.
>
> On Jan 21, 12:01 pm, op
On Tuesday 22 January 2008 16:16:34 code_berzerker wrote:
> theres line of code in tutorial:
>
> Poll.objects.all().order_by('-pub_date')[:5]
>
> this gives 5 Poll objects. I wonder if this is efficient way of
> getting them? Does django get all rows first and then sort it and then
> slice it to g
5 matches
Mail list logo