Re: Proposal: relationships based on arbitrary predicates

2018-09-18 Thread Alexander Hill
Hi Silvio, Thanks for your feedback. David Sanders brought up something similar to ComputedField on GitHub[0] - a ForwardedField which can traverse relationships and present a field from a remote instance as if it were a local field. As long as it can traverse relationships, that use case would be

Re: 301 vs 308 in default redirect class for CommonMiddleware

2018-09-18 Thread Adam Johnson
This is historical, 307 and 308 were added later, and I think we couldn't change it without breaking backwards compatibility. That said, 307 and 308 classes could be added to django.http.response and the documentation could recommend their use. Mozilla docs show that they're compatible with all tra

301 vs 308 in default redirect class for CommonMiddleware

2018-09-18 Thread Matthieu Bonnefoy
Hi there, I am wondering why the default redirect class in the common middleware is a 301 Moved Permanently response. https://github.com/django/django/blob/master/django/middleware/common.py#L32 https://github.com/django/django/blob/master/django/http/response.py#L476 I just got the issue of a P