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

2017-11-09 Thread Tony King
Thanks Gourav, I have it working now and I can even understand it, which is even better. For anyone interested my revised working solution is below. I'm sure it would be better practice putting the token into the headers as described in the documentation and elsewhere but I could not get it t

Re: static files in production

2017-11-08 Thread Tony King
Ok, I've found a solution here which allows the serving of static files from within the project file folder structure as gathered by collectstatic. I now see that the FastCGI Handler required for

Re: static files in production

2017-11-08 Thread Tony King
> Thanks. The diagram clarified what I'd already thought to a degree, > although I'd gotten confused by the warning in the documentation for > STATIC_ROOT, which says > " This should be an initially empty destination directory for collecting your static files from their permanent locations

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: My first project - URL issue?

2017-11-02 Thread Tony King
> > Ok, well I've solved my immediate problem but clearly need to learn more > about JavaScript, jQuery and CSRF tokens. > But for anyone with a similar URL issue, I did the following; Added an appname setting to my urls.py appname = 'shopfront' urlpatterns = [ url(r'^$', views.index, name='ind

My first project - URL issue?

2017-11-02 Thread Tony King
Hi, I've started my first real project (django v1.11.4 and Python 3.6.2) and I'm probably trying to run before I'm ready, but anyway I'm here. I'm essentially trying to create a front-end menu, that will eventually launch and log-on to either a local application or another web-site. This lat

Re: Tutorial part 4 - get_queryset

2017-10-17 Thread Tony King
Thanks James, that is a big help and I'm sure the link will provide some worthwhile extra reading, although I've clearly got a lot to learn anyway. Regards, Tony -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou