Re: Trying understand static files.

2015-04-23 Thread john
Thank you very very much! It's no longer black magic. I did not think about the fact that the template just becomes a simple HTML page and the client browser has to get the javascript as requested. Johnf On 04/23/2015 07:35 AM, C. Kirby wrote: Hi John, It can be a little confusing. Once yo

Re: Trying understand static files.

2015-04-23 Thread C. Kirby
Hi John, It can be a little confusing. Once you are in production and not using runserver, django does not serve the static files. This is what happens: The template expands this snippet with a tag: into (something like) this (Taking into account the STATIC_URL that Lachlan discussed above):

Re: Trying understand static files.

2015-04-22 Thread john
Thanks guys - that worked! I'm going to call it black magic - because to be truthful I don't understand how it really works. If anyone has a better link than Django's on static files that explains what is really happening - it would be very helpful. Johnf On 04/22/2015 04:57 PM, Mi

Re: Trying understand static files.

2015-04-22 Thread Mike Dewhirst
On 23/04/2015 9:35 AM, john wrote: Hi, I have created a website that works well under "runserver". But when I use nginx and uwsgi the basic website comes up but it is missing the static file information. I have run "manage.py collectstatic" but still no static files are used. Reading the Django

Re: Trying understand static files.

2015-04-22 Thread john
Thanks that helps with the nginx configure file. But what I don't understand is how the template tells nginx what to serve? There has to be some sort of black magic here! As I understand the process - the client asks for a page - django routes via urls - it finds the template and processes i

Re: Trying understand static files.

2015-04-22 Thread Lachlan Musicman
Oh my aching head and static files. STATIC_URL points to the namespace that the files will be served from: eg mydomain.com/static To set this up, in nginx/apache you need a stanza that looks like: location /static { alias /var/www/trees/opentrees/static; } STATIC_ROOT is where those

Re: Trying understand static files.

2015-04-22 Thread Aaron C. de Bruyn
Have you looked through the deployment documentation yet? (https://docs.djangoproject.com/en/1.8/howto/deployment/) -A On Wed, Apr 22, 2015 at 4:35 PM, john wrote: > Hi, > I have created a website that works well under "runserver". But when I use > nginx and uwsgi the basic website comes up but

Trying understand static files.

2015-04-22 Thread john
Hi, I have created a website that works well under "runserver". But when I use nginx and uwsgi the basic website comes up but it is missing the static file information. I have run "manage.py collectstatic" but still no static files are used. Reading the Django doc's tells me that I need the