Re: static files in production

2017-11-07 Thread Antonis Christofides
Hello, You might find my drawings on how django static files work in production helpful. Unfortunately they are only for nginx and apache, but the same principles apply to IIS. Regards, Antonis Antonis Christo

Re: static files in production

2017-11-07 Thread Dylan Reinhold
In production django does not serve static files. You need to configure iis to serve the files directly from your STATIC_ROOT directory. Then from your project you run manage.py collectstatic . Django will collect up all the staic files and put them in STATIC_ROOT. Dylan On Nov 7, 2017 7:21 AM,

static files in production

2017-11-07 Thread Tony King
Hi again, I'm having to deploy my project using IIS 8.5 as this all I have access too and I've been relatively successful, however, my static image files are not displaying in the way they did in the development environment. I've tried adding what I believe to be the recommended settings but I

How do I pass the CSRF token when using a jQuery post

2017-11-07 Thread Tony King
Hi, I thought I'd finally understood this but it seems I have not and I've spent far too much time trying to do it myself. I have a view rendering to the template below, which is displaying a number of buttons that when clicked will execute another Python function in the views.py. This works

Re: Add a processing page between submit page and result page

2017-11-07 Thread Adam Simon
On Tue, Nov 7, 2017 at 6:28 AM C. Kirby wrote: > You have two choices. One would be to use the relatively new Channels > feature, which allows you to keep a communication stream open so that you > would have the processing page show until the sever notified the client > that it was done and sent

Re: Find a typo in the documentation.

2017-11-07 Thread Tim Graham
I pushed a fix for that, thanks! On Tuesday, November 7, 2017 at 3:42:14 AM UTC-5, 王祥 wrote: > > In this site > , > the code > Book.objects.all().aggregate(price_diff=Max('price', output_field= > FloatField()) - Avg('pri

Extending WSGI with Cython

2017-11-07 Thread Etienne Robillard
Hi all, I'm the main developer of the django-hotsauce project, a microframework derived from Django to build scalable web apps on top of WSGI. I use Cython for extending Django with a custom "BaseController" type object, to handle low-level HTTP/1.1 request/response semantics: https://bitbuc

Re: WSGI Steps and Sequence ... django.setup() reduces latency?

2017-11-07 Thread Etienne Robillard
Hi, I don't initialize django.setup() at runtime but when modules are loading. I have not observed any latency issues when django.setup() is disabled. See here for an example: https://bitbucket.org/tkadm30/django-hotsauce/src/1cee385a8b7ecaf94c0e4c3785174aee43d72de2/lib/notmm/controllers/ws

WSGI Steps and Sequence ... django.setup() reduces latency?

2017-11-07 Thread guettli
I guess wsgi uses these steps: 1. WSGI Process starts (Up to now no single request comes in) 2. HTTP Requests comes in. You can get this timestamp via X-Request-Start. See https://docs.newrelic.com/docs/apm/applications-menu/features/request-queue-server-configuration-examples 3. Django gets cal

Find a typo in the documentation.

2017-11-07 Thread 王祥
In this site , the code Book.objects.all().aggregate(price_diff=Max('price', output_field=FloatField ()) - Avg('price'))) There is an extra right parenthesis in the end. -- You received this message because you are subs