On Feb 7, 4:32 pm, "Reinmar" <[EMAIL PROTECTED]> wrote:
> If you need to be flexible that way, I suppose you could set up a
> constant like URL_PREFIX in a module, e.g. yourproject/constants.py,
> and then
>
> from yourproject.constants import URL_PREFIX
>
> in your various urls.py, models.py and views to have access to it and
> insert it into urlpatterns, get_absolute_url() and templates etc. If
> it's set to an empty string, you'll havehttp://www.some_site.com/
> my_apps/app1/show_something/, and to achieve the change in your
> example you set it to 'someone/told/me/to/move/them/'
>
> If there's a more efficient way, I'd be interested too.
>

Yes, this solves my problems when updating urls.py, but still i have
no idea how to use it in templates.
Should I create my own template tag?
If so, maybe it should be a standard one?

thanks,
skink


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to