#10827: django.auth create_permissions must clear the content type cache before
creating permissions
------------------------------+------------------------------------
     Reporter:  seanl         |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  contrib.auth  |                  Version:  master
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  1             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+------------------------------------

Comment (by gcc):

 +1. This just bit us as well.

 I think if flush is going to invalidate caches (which it appears to do),
 then it should be sending a signal that allows holders of caches to
 respond appropriately. So something like this in flush.py:

 {{{
 for app in set(all_models):
     models.signals.post_flush.send(sender=app, app=app,
         created_models=created_models, verbosity=verbosity,
         interactive=interactive, db=db)
 emit_post_sync_signal(set(all_models), verbosity, interactive, db)
 }}}

 Assuming a new signal `flush` which ContentTypeManager listens for, and
 then flushes its cache.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/10827#comment:10>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to