You could use a schemeless URL for STATIC_URL. E.g:

STATIC_URL = "//static.yourdomain.com"

_Nik

On 8/6/2012 3:53 PM, Melvyn Sopacua wrote:
> On 6-8-2012 17:56, Mark Gemmill wrote:
>> I am not sure how that would work. Remember, this is a single instance of 
>> django - i.e. I'm not running the https/admin part of the 
>> site as a separate instance and therefore have only one settings file.
>>
>> What I came up with so far was to create 2 static url settings:
>>
>> *STATIC_URL = 'https://secureded/admin/static/'*
>> *NON_SECURE_STATIC_URL = 'http://non/admin/static/'*
> Do you require the server name in STATIC_URL, meaning they're served on
> a different hostname? If so, you can still solve your problem with nginx
> rewrite module:
> server {
>       # normal server, listen params etc
>       location /static/ {
>               rewrite ^/(.*)$ http://non/$1 last;
>       }
> }
> server {
>       # ssl, listen params, ssl params
>       location /static/ {
>               rewrite ^/(.*)$ https://secured/$1 last;
>       }
> }
>
> Then in settings.py:
> STATIC_URL = '/static/'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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