Re: Template links when Django not domain root

2009-08-02 Thread Streamweaver
Thanks. I'm not trying to jump the solution. I'm not the server admin and I have to wait until the weekend is over to get that information from them and I will definitely post it. I was simply asking a question. Trying to come up with a template contexts SITE_URL property isn't an out of bound

Re: Template links when Django not domain root

2009-08-01 Thread Graham Dumpleton
Hacks which embed knowledge of the mount point in the application generally indicate that you are doing something wrong in your configuration. Stop trying to jump to solutions when hasn't even been determined what you are doing wrong. As suggested, post the mod_wsgi configuration you are using s

Re: Template links when Django not domain root

2009-08-01 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Check out RequestContext and setting it up with the setting in settings.py: http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the

Re: Template links when Django not domain root

2009-08-01 Thread Streamweaver
Thanks for the great replies here. It seems from this there might be less repetition if I can just put a SITE_URL attribute in my settings.py file and then make that available to the template without having to go through the view. Is this possible or easy? Custom template filter perhaps but the

Re: Template links when Django not domain root

2009-07-31 Thread Adam Yee
On Jul 30, 7:29 pm, Graham Dumpleton wrote: > If you are using mod_wsgi then you definitely do not need > FORCE_SCRIPT_NAME as mod_wsgi does the correct think in respect of > setting up SCRIPT_NAME/PATH_INFO. The only time it might not be right > with mod_wsgi is if you used WSGIScriptAliasMatch

Re: Template links when Django not domain root

2009-07-30 Thread Graham Dumpleton
If you are using mod_wsgi then you definitely do not need FORCE_SCRIPT_NAME as mod_wsgi does the correct think in respect of setting up SCRIPT_NAME/PATH_INFO. The only time it might not be right with mod_wsgi is if you used WSGIScriptAliasMatch to map the application and you didn't set up the dire

Re: Template links when Django not domain root

2009-07-30 Thread Streamweaver
I'm not actually using {% url %} at this time. I am setup for mod_wsgi and don't know how to go about configuring links in the templates when the sites root is on a subdirectory. There isn't much in the way of examples on FORCE_SCRIPT_NAME I can find and I'm not really an apache admin so I'm a b

Re: Template links when Django not domain root

2009-07-30 Thread Graham Dumpleton
Using FORCE_SCRIPT_NAME is only appropriate for certain WSGI hosting mechanisms. Using it may simply hide the fact that the OPs application code is wrong to begin with. OP should indicate how they are hosting their application for real site. Ie., mod_python, mod_wsgi, fastcgi or other. Graham O

Re: Template links when Django not domain root

2009-07-30 Thread Alex Koshelev
If you are using `{% url %}` template tag or `reverse` function you can set FORCE_SCRIPT_NAME [1] settings variable specified for your deployment project root. Or working with right web-server in front of django project force it to tell proper SCRIPT_NAME himself. [1]: http://docs.djangoproject.co

Template links when Django not domain root

2009-07-30 Thread Streamweaver
I have a django project that has worked just fine in development but I'm trying to move it to a demo site and the application is not on a root domain or sub-domain. Instead the site root URL is suppose to be something like https://site.domain.com/appname/ This is causing all my template links to