use a ñ in a url isn't a good way to work... why don't you change it for a
n? With a ñ you could have problems between explorers.

Anyway, you can use <a href="{% url mmmm var %}">link</a>

On Mon, Aug 30, 2010 at 23:29, refreegrata <refreegr...@yahoo.com> wrote:

> i know how configure my urls.py is ok, with regular expression. but i
> must do something like
>
> <a href="{% url mmm %}var/{{  var|urlencode }}/">link</a>
>
> Now works. In the browser url the character "ñ" is not converted to
> "%C3%B1", but the character "+" is converted to "%2B". maybe i have
> some problems with the theory. Maybe the character "ñ" isn't a
> problem, and for this reason is not converted.
>
> Thanks for read.
>
> On 30 ago, 17:13, Alexandre González <agonzale...@gmail.com> wrote:
> > With django you can define you url in urls.py as:
> >
> > url(r'^sample$', sample, name='the_name'),
> >
> > and then in your template use: {% url the_name %}
> >
> > If it need a id or similar you can provide it with {% url the_name ID %}
> >
> >
> >
> > On Mon, Aug 30, 2010 at 23:08, refreegrata <refreegr...@yahoo.com>
> wrote:
> > > for the moment i don´t have a problem, the section of my site work's
> > > fine. Maybe is just a PHP habit.
> >
> > > In php when a wont to build an url in the template  i do somethin like
> > > ------------------------
> > > <?php $aaa = "óñ+" ?>
> > > echo '<a href="http://mysite.php?aaa='.urlencode($aaa).'>link</a>';
> > > --------------------------
> > > because $aaa can have some special characters.
> >
> > > I thought that the urlencode filter do this in django. I must to build
> > > an url in the template with parameters for a filtered pagination.
> >
> > > On 30 ago, 16:44, Alexandre González <agonzale...@gmail.com> wrote:
> > > > Why do you like to do it?
> >
> > > > I think that your problem is with codification, and not with
> > > urlenconde...
> > > > try to search about utf8 and html
> >
> > > > On Mon, Aug 30, 2010 at 22:09, refreegrata <refreegr...@yahoo.com>
> > > wrote:
> > > > > i'm sorry in my last time  accidentally send the post before of
> > > > > finish.
> > > > > I try to do in the template something like
> > > > > {{ my_var|urlencode }}
> > > > > but  don't work. Can i do something like an urlencode in the
> template?
> >
> > > > > P.D.: I'm from Chile.
> >
> > > > > --
> > > > > 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
> > > > > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@googlegroups.com>
> >
> > > <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@googlegroups.com>
> <django-users%252bunsubscr...@googlegroups.com<django-users%25252bunsubscr...@googlegroups.com>
> >
> >
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/django-users?hl=en.
> >
> > > > --
> > > > Please, don't send me files with extensions: .doc, .docx, .xls,
> .xlsx,
> > > .ppt
> > > > and/or .pptx
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@googlegroups.com>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
> >
> > --
> > Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx,
> .ppt
> > and/or .pptx
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Please, don't send me files with extensions: .doc, .docx, .xls, .xlsx, .ppt
and/or .pptx

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to