We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d48fca commit b90fa83Copy full SHA for b90fa83
example/unicorn/components/hello_world.py
@@ -1,3 +1,5 @@
1
+from django.utils.timezone import now
2
+
3
from django_unicorn.components import UnicornView
4
5
@@ -8,3 +10,4 @@ class HelloWorldView(UnicornView):
8
10
9
11
def set_name(self):
12
self.name = "set_name method called"
13
+ return "set_name called at " + now().strftime("%H:%M:%S.%f")
example/unicorn/templates/unicorn/hello-world-test.html
@@ -1,5 +1,7 @@
<div>
<button unicorn:click="$reset">Reset the component</button>
+ <button onclick="document.getElementById('name').value = 'asdf';">Plain JS set value on key1</button>
+ <button onclick="Unicorn.trigger('unicorn.components.hello_world.HelloWorldView', 'key1')">Trigger key1</button>
<br />
6
7
0 commit comments