Re: Allow skipping CSRF check for Referer header

2018-11-09 Thread Adam Johnson
I also discovered a similar problem recently when deploying the "Referrer-Policy" header using James Bennett's library: https://django-referrer-policy.readthedocs.io/en/stable/ . Initially I opted for 'no-referrer' as I figured it was the most secure, but since this check is only done on

Allow skipping CSRF check for Referer header

2018-11-09 Thread Aaron Hill
Currently, Django's CSRF middleware will reject any 'non-safe' HTTPS request that lacks a Referer header: ​ https://github.com/django/django/blob/22e8ab02863819093832de9f771bf40a62a6bd4a/django/middleware/ csrf.py#L242 However, some users may prevent their browsers from sending the Referer

skipping elidable migrations

2018-11-09 Thread Dan Watson
Hi All, I was wondering if anyone had any thoughts on an option to the "migrate" command (--skip-elidable?) that would skip running elidable migrations. The use case here is that data migrations that build up over time may act on certain assumptions (existing tables/data) that may not be true

Re: Updating date field using signals

2018-11-09 Thread Michael Manfre
This mailing list is for the development of the Django Framework. Questions related to its usage should be posted to the django-users mailing list. Regards, Michael Manfre On Fri, Nov 9, 2018 at 6:51 AM wrote: > Hi all, > > I have a very simple Profile class: > > class Profile(models.Model): >

Updating date field using signals

2018-11-09 Thread pastrufazio
Hi all, I have a very simple Profile class: class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) location = models.CharField(max_length=30, blank=True) birth_date = models.DateTimeField(null=True, blank=True) date_activation =