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 have http://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. > hi guys, > > let's assume i have my urls configured as follows: > > http://www.some_site.com/my_apps/app1/show_something/ > http://www.some_site.com/my_apps/app2/show_something/ > > and some day i have to move them: > > http://www.some_site.com/someone/told/me/to/move/them/my_apps/app1/show_something/ > http://www.some_site.com/someone/told/me/to/move/them/my_apps/app2/show_something/ > > is there some easy way of migration from my original configuration to > the final form? > > of course i can manually change urls.py and every links in my > templates which refer to absolute urls eg: > > <a href="/my_apps/app1/show_something/">app 1</a> to: > <a href="/someone/told/me/to/move/them/my_apps/app1/ > show_something/">app 1</a> > > but i think it shouldn't be done that way > > cheers, > 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 -~----------~----~----~----~------~----~------~--~---