#17904: Custom permissions on proxy model no longer created -------------------------------------+------------------------------------- Reporter: Koen Biermans | Owner: Arthur | Rio Type: Bug | Status: closed Component: contrib.auth | Version: master Severity: Normal | Resolution: fixed Keywords: proxy contenttype | Triage Stage: Accepted permission | Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Tim Graham):
* status: assigned => closed * resolution: => fixed Comment: This ticket is fixed but it was kept open to restore the optimization of f04af7080b12744c8f06fb8228ef683d556690d0 (using `ContentType.objects.get_for_models()`). [https://github.com/django/django/pull/10381 PR 10381] doesn't restore the optimization although it's been linked to this ticket. I tried using `get_for_models()` in that patch, but it doesn't work anymore because `create_permissions()` now uses model states (which don't have custom methods). Here's the error: {{{ File "/home/tim/code/django/django/contrib/contenttypes/models.py", line 89, in get_for_models opts_models = needed_opts.pop(ct.model_class()._meta, []) AttributeError: 'ContentType' object has no attribute 'model_class' }}} If someone wants to look at that optimization again, please open a new ticket. -- Ticket URL: <https://code.djangoproject.com/ticket/17904#comment:13> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.7a5156978b8bc1485f7e671f364c57fe%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.