I'm running Django on AppEngine (python 2.7 runtime) using their Cloud SQL. I've setup the application as described in Google's Cloud SQL docs Django Support. Everything is working great, but I want to make some of the urls secure, and I can't find any documentation on how to do that.
Normally you would just add the 'secure: always' to the handler you want secure, but as I'm not specifying the handlers/script for the app (I'm assuming the 'django_wsgi' builtin is doing that) there is no place to add the secure setting.
My app.yaml file is:
application: app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
libraries:
- name: django
version: "1.2"
builtins:
- django_wsgi: on
- deferred: on
handlers:
- url: /media
static_dir: media
The django_wsgi builtin is actually just adding the following to app.yaml:
handlers:
- url: /.*
script: google.appengine.ext.django.main.app
position: tail
So you can just replace the builtin-directive with this handler and add the secure-clause to the handler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With