You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart-django.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,9 @@ class CounterReflex(Reflex):
90
90
```
91
91
{% endcode %}
92
92
93
-
Sockpuppet maps your requests to Reflex classes that live in your `your_app/reflexes` folder or reflexes that exist in the file `your_app/reflex.py`. In this example, the increment method is executed and the count is incremented by 1. The `self.count` instance variable is passed to the template when it is re-rendered.
93
+
Sockpuppet maps your requests to Reflex classes that live in your `your_app/reflexes.py` module, or in a `your_app/reflexes` package with an `__init__.py` file that imports all the Reflex subclasses in that directory (similar to [organizing Django models in a package](https://docs.djangoproject.com/en/3.1/topics/db/models/#organizing-models-in-a-package)).
94
+
95
+
In this example, the increment method is executed and the count is incremented by 1. The `self.count` instance variable is passed to the template when it is re-rendered.
Copy file name to clipboardExpand all lines: docs/reflexes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Server side reflexes inherit from `sockpuppet.Reflex`. They hold logic responsib
11
11
* Sockpuppet: the name of this project, which has a JS websocket client and a django based server component, which is based on django-channels.
12
12
* Stimulus: an incredibly simple yet powerful JS framework by the creators of Rails
13
13
* "a Reflex": used to describe the full, round-trip life-cycle of a Sockpuppet operation, from client to server and back again
14
-
* Reflex class: a python class that inherits from `sockpuppet.Reflex` and lives in your `reflexes`folder or `reflex.py`, this is where your Reflex actions are implemented.
14
+
* Reflex class: a python class that inherits from `sockpuppet.Reflex` and lives in your `your_app/reflexes`package or `your_app/reflexes.py` file. This is where your Reflex actions are implemented.
15
15
* Reflex action: a method in a Reflex class, called in response to activity in the browser. It has access to several special accessors containing all of the Reflex controller element's attributes
16
16
* Reflex controller: a Stimulus controller that imports the StimulusReflex client library. It has a `stimulate` method for triggering Reflexes and like all Stimulus controllers, it's aware of the element it is attached to - as well as any Stimulus [targets](https://stimulusjs.org/reference/targets) in its DOM hierarchy
17
17
* Reflex controller element: the DOM element upon which the `data-reflex` attribute is placed, which often has data attributes intended to be delivered to the server during a Reflex action
0 commit comments