File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -231,12 +231,15 @@ def render_page(self, reflex):
231231 instance_variables = [
232232 name
233233 for (name , member ) in inspect .getmembers (reflex )
234- if not name .startswith ("__" ) and name not in PROTECTED_VARIABLES
234+ if not name .startswith ("__" )
235+ and name not in PROTECTED_VARIABLES
236+ and not callable (getattr (reflex , name ))
235237 ]
238+
236239 reflex_context = {key : getattr (reflex , key ) for key in instance_variables }
237240 reflex_context ["stimulus_reflex" ] = True
238241
239- if not reflex . context . _attr_data :
242+ if len ( instance_variables ) > 0 :
240243 msg = (
241244 "Setting context through instance variables is deprecated, "
242245 'please use reflex.context.context_variable = "my_data"'
Original file line number Diff line number Diff line change 99 "context" ,
1010 "element" ,
1111 "params" ,
12+ "request" ,
1213 "selectors" ,
1314 "session" ,
1415 "url" ,
16+ "_init_run" ,
1517]
1618
1719
@@ -26,6 +28,7 @@ class Context(UserDict):
2628 > context.my_data = 'hello'
2729 > context.my_data # 'hello'
2830 """
31+
2932 # NOTE for maintainer
3033 # A dictionary that keeps track of whether it's been used as dictionary
3134 # or if values has been set with dot notation. We expect things to be set
You can’t perform that action at this time.
0 commit comments