foo bar baz
> evaluate to False.
>
> On Apr 25, 6:35 pm, "Wolfram Kriesing" <[EMAIL PROTECTED]>
> wrote:
>
> > thank you for all the quick replies.
> > Mmmmh, its good to see that it is there, though I think
> > {{ num_files or "no
Honza Král <[EMAIL PROTECTED]> wrote:
> there is a template filter called default, that does exactly this.
>
> http://www.djangoproject.com/documentation/templates/#default
>
> On Fri, Apr 25, 2008 at 4:15 PM, Wolfram Kriesing
>
> <[EMAIL PROTECTED]> wrote:
>
I guess it might had been discussed, just didnt find anything.
This extended syntax would really make some writing shorter
user has {{ num_files or "no" }} files
now, you have to write
user has {% if num_files %} {{ num_files }} {% else %} no {%
endif %} files
Are there an
hi guys,
is there some kind of follow up to this topic
or is it simply dead?
wolfram
On Nov 26, 2007 11:58 AM, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I would like to allow the following too:
>
> {% blocktrans %}
>Received on {{ message.created|date as date }}
>
you are right!
lol, trapped myself nicely ... happens when you dont think :-)
thx
wolfram
On Dec 4, 2007 3:57 PM, Luke Plant <[EMAIL PROTECTED]> wrote:
>
> On Tuesday 04 December 2007 14:41:07 Wolfram Kriesing wrote:
> > another thing i jsut ran into:
> >
>
wolfram
On Dec 4, 2007 9:53 AM, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I remember my beginner times with django, i was searching for limit()
> until I had to remind myself multiple times that you have to use [x:y] for it.
> limit() seemed the reasonable straightforward thin
On Dec 4, 2007 10:00 AM, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> On Tue, Dec 04, Gary Wilson wrote:
>
> > And I say QuerySets are more like lazy-evaluated lists. lists are iterable
> > and can be sliced.
>
> I think this hits the point.
>
> What do you think about this: a QuerySet fetches
I remember my beginner times with django, i was searching for limit()
until I had to remind myself multiple times that you have to use [x:y] for it.
limit() seemed the reasonable straightforward thing ... and thats what
i am used to from python
but this time it was different
Providing limit() wou
I would like to allow the following too:
{% blocktrans %}
Received on {{ message.created|date as date }}
...
this removes the "with-as" stuff from the blocktrans completely
to increase the readablitiy of the entire block and not squeeze all
the variables in at the opening blocktrans
wolfram
+1
Wolfram
On Nov 26, 2007 9:22 AM, alain D. <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Trying to sum up the discussions so far I would say that Wolfram's
> syntax seems to be the preferred one : i.e. letting the logic go into
> the translated string but keeping the strings to translate in one bit
> - regarding the problem that the translation is maintained in
> chucks : if not then there is the presence of logic in the translation
> string, which is not possible I think. If you agree on that, it means
> that the translation _has_ to be maintained in chucks
This nails the main problem im
Hi,
I was following this thread, since I also think a solution is needed
here, badly!
I think Alain's initial solution is the best until now, and closest to
what is needed, but true, its tooo complex.
I don't have a final solution but may be one step ahead ...
I know the big problem here is to m
On 9/26/07, Andrew Durdin <[EMAIL PROTECTED]> wrote:
>
> On 9/26/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> >
> > I ran into the problem while doing this:
> >
> > >>> from django.utils.translation import gettext_lazy as _
> >
I ran into the problem while doing this:
>>> from django.utils.translation import gettext_lazy as _
>>> s = _("my string")
>>> s += _("my second string")
Traceback (most recent call last):
File "", line 1, in ?
TypeError: unsupported operand type(s) for +=: '__proxy__' and '__proxy__'
>>>
the
it gets even more difficult in languages like russian, where i think
that a name depends on the linguistic case of the sentence it is used
in ...
wolfram
On 6/14/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> yeah that is not really a nice way to do it, but the only possible one
&g
yeah that is not really a nice way to do it, but the only possible one
currently.
We were discussing this issue a lot here, and have not come up with a
final nice syntax yet either, since there are a couple issues that
come up, but they just come up when you run into them :-)
On 6/14/07, Malcolm
but watch out, gettext doesnt like line breaks inside a blocktrans, i
only added them for readbility
On 6/14/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I understand Alans problem very well, the problem is that the text
> "this has been done by user A-HREF"
>
I understand Alans problem very well, the problem is that the text
"this has been done by user A-HREF"
is not always translated in the same order of words for all the
languages, so the "XXX" which is a link (in alains example) might be
at some other position, like in german
"Dies wurde von
On 4/12/07, jp <[EMAIL PROTECTED]> wrote:
>
> Oh, in addition I was wondering what the 'right' way to do this would
> be at the current time?
very nice that you are bringing this up. I am also just waiting for
the wholy grale on this one.
Since I have tried creating forms from models, fields and
or something
alike.
regards
Wolfram
On 4/11/07, Gulopine <[EMAIL PROTECTED]> wrote:
>
> On Apr 11, 8:10 am, "Wolfram Kriesing" <[EMAIL PROTECTED]>
> wrote:
> > The "add_data" adds the data to the context inside the render()
> > function of the t
I have written a new tag "add_data", which (if i break it down) does
only store some data, that it gets passed or generates (in the example
below it gets the data from the template, for easier demonstration)
{% add_data "one" %}
{% for u in users %}
{% add_data "two" %}
{% endfor %}
{% add_
darn, it must have slipped into the spam, sorry.
thx for the reply
On 4/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> On 4/4/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> >
> > I have summarized the problems I had with django's
I have summarized the problems I had with django's json serializer
here
http://wolfram.kriesing.de/blog/index.php/2007/json-serialization-for-django
i would be very interested if I might be doing something completely
wrong or if those are reall life problems other people have too. If so
I would b
On 4/2/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On 4/2/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> > 1) How can I help getting this functionality into trunk? (enhance the
> > patch, write doc, ...)
> > 2) Is this something that would be
There is an existing ticket
(http://code.djangoproject.com/ticket/3275), which had been partially
implemented (http://code.djangoproject.com/ticket/3275#comment:10).
This commit adds the depth parameter, nice thing. Thanks!
The second parameter "fields" has not been added yet. It can help
reduce
On 3/26/07, Jeremy Bowers <[EMAIL PROTECTED]> wrote:
>
> Wolfram Kriesing wrote:
> > The main reason I need this is that I want to have a transparent model
> > that switches the underlying language (the according DB table it
> > should work on) on the fly, so i
On 3/26/07, Honza Král <[EMAIL PROTECTED]> wrote:
> On 3/26/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> >
> > I would like to change the table of a model on the fly.
> > I was looking into the Manager code, but since the get_query_set()
> > method in t
I would like to change the table of a model on the fly.
I was looking into the Manager code, but since the get_query_set()
method in there uses the model as is, changing the
model._meta.db_table would most probably change the db_table for all
users/threads, not only for the current one, right?
An
http://code.djangoproject.com/ticket/3163
what do i need to do next to get this in or rejected?
--
thx
Wolfram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
developers" group.
To post to this group, send
I had the following problems with the default json encoder that is
suggested to use:
* cant handle Decimal
* ignores properties that are not fields, it only encodes the fields
(but i often add more properties to the object for passing to the
template)
* has problems with some m2m relations (at lea
Could someone please add [EMAIL PROTECTED]to the whitelist, so i can add tickets to trac.thx-- cu
Wolfram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, se
31 matches
Mail list logo