Ask Your Question

Three different domains for js,css and images

asked 2013-09-26 05:55:32 -0500

anshprat's avatar

updated 2013-09-26 11:40:36 -0500


I want to host my different types of static files on different domains. I have all the static files from domain other than the main askbot domain but I want to break it down to three different domains by type to increase parallel download. How can I do it in django / askbot ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-26 11:43:47 -0500

updated 2013-09-30 00:44:20 -0500

Evgeny's avatar

You'll have to modify the STATIC_URL and MEDIA_URL in your

There is no support currently for separate domains for css, js or other static files. They must all go in one domain, which however could be different from the main application domain.

edit flag offensive delete link more


@Fitoria I am using STATIC_URL but that sets all static urls to just one another domain. I want something like js being loaded from and css from and images from

anshprat's avatar anshprat  ( 2013-09-26 12:44:43 -0500 )edit

Not sure on how to make it with this case, maybe making a template tag/filter for static media that changes the url according to the media type?

Fitoria's avatar Fitoria  ( 2013-09-27 16:12:35 -0500 )edit

@Fitoria if there could be something like STATIC_JS_URL , STATIC_CSS_URL and STATIC_IMG_URL with default values being STATIC_URL, makes sense?

anshprat's avatar anshprat  ( 2013-09-28 07:56:07 -0500 )edit

@anshprat there are not such settings for that, let me do some research on how to do it

Fitoria's avatar Fitoria  ( 2013-09-29 11:34:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-09-26 05:55:32 -0500

Seen: 346 times

Last updated: Sep 30 '13