I use {% url myproject.core.views.member_create %}

But in the production server, it give :(
http://www.mysite.fr/var/www/mysite/mysite/user/create/
instead of : http://www.mysite.fr/user/create/

On 18 mar, 14:24, Briel <toppe...@gmail.com> wrote:
> Hi.
> Instead of generating all of your urls as a base url + something, you
> can insteadl use the url template tag, that way you can get your url
> in the template more or less like this (if you use named urls):
> {% url user_change %}
> using reverse matching, django can figure out what the url needs to
> be, and if you deside to change your url mapping, all you need to do
> is change your urls.py files to get the change. That way you wont have
> to go through templates ect to make a lot of changes all over the
> place.
> You can read about the url template tag at the 
> docs.http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url
>
> ~Jakob
>
> On 18 Mar., 13:35, Bro <coolpari...@gmail.com> wrote:
>
> > Hi,
>
> > My project root path is :http://127.0.0.1:8000/
>
> > The user path is :http://127.0.0.1:8000/user/
> > The change form path is :http://127.0.0.1:8000/user/change/
> > In the template.html file I use : {{ root_path }}change/
>
> > My question : how to get the variable of the root path (http://
> > 127.0.0.1:8000/)
> > I want to have this url :http://127.0.0.1:8000/change/
>
> > Thanks :)
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to