Re: @csrf_protect annoying on django.contrib.auth.views.login

2015-07-02 Thread mdj2
I was not aware of that kind of attack. It's pretty clever. Thanks for the info and the workaround JS. On Wednesday, July 1, 2015 at 4:29:32 PM UTC-7, Collin Anderson wrote: > > Hi, > > This is the best reason I could find: > > http://security.stackexchange.com/questions/62769/must-login-and-logo

Re: Inheritance in admin classes

2015-07-02 Thread Marc Tamlyn
It's a symptom of the poor design of ModelAdmin (especially compared to View). It is just "normal" python classes, but it has methods on it which feel request specific so it's very easy to fall into the trap of thinking of it as a request level object not a process level object. Model instances, fo

Re: Inheritance in admin classes

2015-07-02 Thread Collin Anderson
Hi All, It seems to me this is just how class inheritance works in Python. Nothing special in Django here, it just might not be intuitive. I do think deepcopy has too much overhead to warrant a deepcopy by default in Django for everyone, but it may help you to use it in your code. Collin On T

Re: Inheritance in admin classes

2015-07-02 Thread Jani Tiainen
Hi, I had my fun when I tried to add more inline stuff to a Admin form, and I ended up doing thiskind of stuff: https://janimagik.wordpress.com/2015/05/05/django-admin-and-inline-chaining/ I guess problem is how Django admin uses metaclass to do some magic behind the scenes. On Thu, 2 Jul 201

Re: Inheritance in admin classes

2015-07-02 Thread knyght
I think it could be - if not the exact same issue - one that would be fixed by the same patch. My specific use case is something like this: class MyUserAdmin(UserAdmin): def get_fieldsets(self, request, obj=None): fieldsets = super().get_fieldsets(request, obj) fieldsets[0][1]

Re: django.channels: "async" for Django

2015-07-02 Thread Tino de Bruijn
Hi Andrew, >From reading your proposal, I really like this idea. I did not got around to trying django-channels yet, but it will in August when I start a new project (it's a PoC, so I can try out new stuff :). I hope to be able to give you more feedback then! Thanks so far, Tino On Thu, Jul 2,