diff --git a/example/unicorn/components/hello_world.py b/example/unicorn/components/hello_world.py index 9c143925..ae96bfaa 100644 --- a/example/unicorn/components/hello_world.py +++ b/example/unicorn/components/hello_world.py @@ -11,3 +11,12 @@ class HelloWorldView(UnicornView): def set_name(self): self.name = "set_name method called" return "set_name called at " + now().strftime("%H:%M:%S.%f") + + @property + def user(self): + return self.request.user + + class Meta: + javascript_exclude = ( + "user", + ) diff --git a/example/unicorn/templates/unicorn/hello-world-test.html b/example/unicorn/templates/unicorn/hello-world-test.html index 722155f7..0ad6f00b 100644 --- a/example/unicorn/templates/unicorn/hello-world-test.html +++ b/example/unicorn/templates/unicorn/hello-world-test.html @@ -8,6 +8,11 @@ +