Thursday, April 11, 2013

Re: Serving files in production

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlFmvckACgkQ12ptzpkpIlvJKgCgr8ThVg3yQTGGS+rdqFvTHVcC
95QAninQCba/57CIq7lhh7ViepTCbf7g
=HekI
-----END PGP SIGNATURE-----
Thanks guys, everything is much clearer now

And there is even a HOW-TO page

https://docs.djangoproject.com/en/1.5/howto/static-files/deployment/

that I also missed as well

Cool beans this Django malarky :)

On Thu, 11 Apr 2013 14:08:29 +0100
Tom Evans <tevans.uk@googlemail.com> wrote:

> On Thu, Apr 11, 2013 at 1:50 PM, Drew Ferguson
> <drew@afccommercial.co.uk> wrote:
> > On Thu, 11 Apr 2013 14:54:50 +0300
> > Avraham Serour <tovmeod@gmail.com> wrote:
> >
> >> you can create a subdomain (static.yourdomain.com) and serve static
> >> using that, configure the second webserver to serve this subdomain
> >
> > OK, but then all static references must be prefixed with the domain in
> > templates, etc AND life gets very complicated when trying to develop
> > the same site on a development system.
>
> All static references have to be prefixed anyway, the difference is
> the prefix contains a domain name.
>
> This is only a problem if you put "/static/app/images.png" in your
> templates, and not {% static "app/images.png" %}
>
> I suggest a more thorough reading of the staticfiles docs:
>
> https://docs.djangoproject.com/en/1.5/ref/contrib/staticfiles/
>
> >
> > Is the recommendation really addressing a performance issue for high
> > traffic sites where Apache WSGI gets overloaded and becomes a
> > bottleneck?
> >
>
> I serve my static files from /static/ *and* they are served by a
> completely different server - static files are served from a frontend
> server that serves static files from disk and proxies dynamic requests
> to a number of django backends. There are many approaches that work to
> address static file serving.
>
> Cheers
>
> Tom
>



--
Drew

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate