I'm not immediately convinced that a database field is the way to go for a couple reasons:
- It would make data less portable between development (where SSL is often not in use) and production.
- I'm not sure it's a common case that only some sites would use SSL but not others.
A third-party library called django-hosts, which djangoproject.com uses, adds a setting called HOSTS_SCHEME to solve this. I think there's been some discussion about merging at least parts of this library into core since it solves common problems.
See also #10944 (we might close this ticket as a duplicate of that one) and #23829 (about customizing ping_google to allow https). I think the best course of action would be to consider this feedback and write to the DevelopersMailingList with your proposal. Either solution of a new setting or a new database field need feedback from a wider audience. Thanks!
- It would make data less portable between development (where SSL is often not in use) and production.
On 25 janv. 2016, at 14:19, Tim Graham <timog...@gmail.com> wrote:
I believe it's a common use case to import a copy of a production database and examine it locally -- that's what I meant about portability.
In using Marten Kenbeek's URL dispatch rewrite branch, I've found that using the pattern of defining some site configuration in your settings is the way to go: it more easily allows you to have URL patterns on multiple domain/scheme combinations.
I use a dict similar to what Tim has shown, and then use it to initialize my scheme/domain URL constraints in my root urls.py.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/b12433a7-aa49-4951-9a77-32747699038d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.