jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

Make it possible to use dot notation for setting context in reflex #136

Open jonathan-s opened 3 years ago

jonathan-s commented 3 years ago

Type of PR (feature, enhancement, bug fix, etc.)

Description

In an effort to improve the api for setting the context that is used in the final context in the reflex we introduce a dot notation for setting the context. Ie reflex.context.my_context = 'value'.

For the old way of setting the context in instance variables you now also prevented to set an instance variable that is already used by the reflex.

Fixes #122, @dylanjw, you might want to have a look at this.

Checklist