As said in my previous message you are right: I don't have a valid reques. So I'm sure I'm doing something wrong. Here is what I'm doing:
In zsite/ancore/url.py: (r'^$', 'zsite.ancore.views.indice'), In zsite/ancore/views.py: @login_required def indice(request): xxx=request.user.get_and_delete_messages() return render_to_response("ancore/index.html", { 'title' : 'ANCORE','messages' : xxx}, context_instance=RequestContext(request)) And in ztemplates/ancore/index.html {% extends "base_index.html" %} {% block coltype %}funzioni{% endblock %} {% block bodyclass %}{% endblock %} {% block breadcrumbs %} {% load mytags %} <div class="breadcrumbs"> {{ request.path }} </div> {% endblock %} Passing the context instance is used to show forms generated messages that uses index.html as success link What I'm doing wrong? Thanks Mirto Malcolm Tredinnick ha scritto: > On Wed, 2008-10-15 at 09:40 +0200, Mirto Silvio Busico wrote: > > >> In the template the line: >> {{ request.path|dovesono }} >> >> passes to the "dovesono" filter a string with length 0. >> > > Let's start with the reasonable simplifying assumption that filters > aren't totally broken in Django. > > So arguments are passed to them correctly if you write a filter similar > to the documentation (which you appear to have done). Which means the > other possibility is that the data you're passing in actually is a > string of length 0 (or resolves to that, since if the variable didn't > exist, that would also be the apparent behaviour). > > For debugging purposes, set up a simple template that is passed a > context variable containing a string you know exactly (e.g. make the > context something like {"foo": "this is a string"}) and then try out > your filter on that. You're attempting to debug something in a > complicated setup here, rather than in an environemtn that is as simple > as possible. Don't have the extra variable of having to worry about > whether "request" exists in the context and, if so, whether > "request.path" contains anything. > > Regards, > Malcolm > > > > > > -- _________________________________________________________________________ Busico Mirto Silvio Consulente ICT cell. 333 4562651 email [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---