Skip to content
This repository was archived by the owner on Dec 27, 2021. It is now read-only.
This repository was archived by the owner on Dec 27, 2021. It is now read-only.

Maybe use django like context  #68

Description

@jbzdak

Django context is really nice, it is a list of maps.

If we need to get a key from this context it just does something like:

for map in reversed(self.dicts)
    if key in map: 
       return map[key]

If we employed this in Role.context and push a new dict to context everytime someone does with Role.using(other_role):, and then pop it afterwards we would have no unneded keys in context, and my problems with passing settings in context from #67 would be solved (since when exiting using we would have erased stuff added to context by used role) .

Another issue it would sove is that we could have problems with implementing sontext managers for owner and modifiers that are nestable.

However it would break stuff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions