Unclear on usage without a form? #463
-
I'm interesting in django unicorn, but all the examples that I have seen include a form in the web page, that Django Unicorn is being used to update? Or am I missing something? I'd like to use this with more of an image gallery... Where Django has the gallery data, and I'd like to use Unicorn to update the data as needed, with forward / backward commands updating the image, file size, etc, data in the page. Am I missing something? Are there any examples like this that I can look at? I didn't see anything close on the examples page... (I guess, I could make the elements in form elements as view only... But... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
Unicorn
can definitely be used without a form! You could have a button or link with aunicorn:click=forward
in the HTML template with adef forward(self)
method in the component backend which gets a the new image data. Try it out and let me know if you get stuck -- if you put some sample code in here I can probably guide you into the right direction. 👍