hi, i just saw this documents, maybe it can help you. from django.conf.settings import
the full url: http://www.djangoproject.com/documentation/settings/ On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote: > > > limodou wrote: > > On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote: > > > > > > Let me rephrase this. I don't disagree with absolute URL's per se, but > > > there should be someway of abstracting them further than is currently > > > available. > > > > > > Lets say that your media server's address changes, doesnt it seem silly > > > to have to go through ALL of your templates to change those absolute > > > URL's? > > > > > > I agree with the idea that media should be served served separately to > > > structure, but I disagree with the implication that stylesheets are > > > media (at least for now, as I love being proved wrong by intelligent > > > people). > > > > > > Lets say I have a django app that I want to make publicly available for > > > others to install and play with. Currently, the stylesheets and > > > templates would have to be separately packaged from the app it self. > > > This doesnt bother me so much with regards to the templates as there is > > > a way to tell your django installation with one line where it should > > > look for templates, but its another matter for stylesheets (and I dare > > > say certain images that IMHO should not be considered *media*). > > > > > > I predict that by reading this post you will have guessed correctly > > > that I'm utterly confused about what is the right thing to do. (the > > > best practice) > > > > > > Sincerely, > > > > > > ChrisW > > > > > > > One method: > > > > set a "base" tag in template, so this tag will point the root uri of > > this page, and other uris can be related with this uri. > > > > Two method: > > > > Define some template variables used for root uri, and using them in > > urls. So you can define them in settings.py or somewhere, and if the > > situation changed, you may only change the settings.py. > > that is precisely what i would like to do. how you access a > variable defined in settings.py from a template tho? i have > not been able to track this bit down. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---