Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/quickstart-django.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ We use data attributes to declaratively tell Sockpuppet to pay special attention

We are also assuming that we have a view that renders this template. The view looks like this.

{% code title="your\_app/view.py" %}
{% code title="your\_app/views.py" %}
```python
from django.views.generic.base import TemplateView

Expand Down Expand Up @@ -99,9 +99,9 @@ import StimulusReflex from 'stimulus_reflex'
import WebsocketConsumer from 'sockpuppet-js'

const application = Application.start()
const consumer = new WebsocketConsumer('ws://localhost:8000/ws/sockpuppet-sync')
application.consumer = new WebsocketConsumer('ws://localhost:8000/ws/sockpuppet-sync')

StimulusReflex.initialize(application, { consumer })
StimulusReflex.initialize(application)
```
{% endcode %}

Expand Down Expand Up @@ -184,10 +184,10 @@ import WebsocketConsumer from 'sockpuppet-js'
import CounterController from './controller/counter_controller.js'

const application = Application.start()
const consumer = new WebsocketConsumer('ws://localhost:8000/ws/sockpuppet-sync')
application.consumer = new WebsocketConsumer('ws://localhost:8000/ws/sockpuppet-sync')

application.register('counter', CounterController)
StimulusReflex.initialize(application, { consumer })
StimulusReflex.initialize(application)
```
{% endcode %}

Expand Down
4 changes: 1 addition & 3 deletions docs/setup-django.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ The configuration above will look for JavaScript files in the folder `your_app/j
If you add that folder to `STATICFILES_DIRS` in settings it will pick that compiled JavaScript and you can use it in templates.

```python
from pathlib import Path
BASE_DIR = Path.cwd()
STATICFILES_DIRS = [
("js", f"{BASE_DIR}/dist/js"),
("js", BASE_DIR / "dist" / "js"),
]
```

Expand Down