On 29 janv. 2016, at 21:45, Tim Graham <timog...@gmail.com> wrote:
Do you think we'll be better off in the long run with a setting as opposed to storing the data in the database?
--
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/52fee0b1-c08f-4ac5-a01e-34b9baa045ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Actually django.contrib.settings needs to be SWAPPABLE. Then it will receive +100. (Oooohh... Someone already proposed this. Even with code sample -> https://code.djangoproject.com/ticket/22779. 3 years ago and ticket still open... How typical... :/)
In my project I'm case #2, but I still need a bunch of additional fields to provide for Site. Icons, descriptions, https flags. Think with SaaS and you'll know the drill.
Currently making it possible equals ton of hackish lines and definitely more DB queries.
Django needs to squish more juice from sites framework. Even for simple uses - Site query is cached anyways. I agree that majority of django powered sites are using SITE_ID = 1, and making dummy instances can be useless overhead, but replacing sites configuration by static dict settings will totally kill the functionality. Sites, when used, should be dynamic and cached. And remember -> sites can be bound dynamically with request.get_host(), so there is no fixed settings (https://github.com/django/django/blob/3c447b108ac70757001171f7a4791f493880bf5b/django/contrib/sites/models.py#L63).