On 24/06/13 08:07, Anshul Gangwar wrote: > Hi JuanFra, > > This is not solving my problem. I want a solution where urls are > relative to certain fixed string say os. > > Currently I can either make them relative by making changes in > settings.py or absolute. > > for example when I see page source I can see urls are of form > > /static/* > /auth/* > > what I want is that when these urls are returned to browser, they are > prefixed with some string like > > /os/static/* > /os/auth/* > > this os string is added on the fly i.e. these urls are absolute, but > relative to certain fixed string. > > Thanks, > Anshul > > What I have done in rpm packages is: (from httpd.conf) WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi Alias /static /usr/share/openstack-dashboard/static
and also required: (from /usr/share/openstack-dashboard/openstack_dashboard/settings.py: WEBROOT = '/dashboard' LOGIN_URL = WEBROOT + '/auth/login/' LOGOUT_URL = WEBROOT + '/auth/logout/' # LOGIN_REDIRECT_URL can be used as an alternative for # HORIZON_CONFIG.user_home, if user_home is not set. # Do not set it to '/home/', as this will cause circular redirect loop LOGIN_REDIRECT_URL = WEBROOT MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media')) MEDIA_URL = '/media/' STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static')) STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/static/admin/' ------------ This whole stuff maps the dashboard to /dashboard. You're free to change /dashboard to whatever you like. (the wsgiscriptalias and also WEBROOT needs to be changed). This implies, that you can accept to have static media mapped to /static. Matthias _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp