I want to display an information in the format of tkinter’s frame.
I used tkinter’s messagebox
to display the properties of the uploaded file but displays across the desktop instead of displaying on the template.
I know tkinter is used for creating a desktop application therefore it is showing across the desktop.
I had also implement a message framework of Django but it is not suitable for my website.
How can I do that?
If you can create HTML, CSS, and/or SVG that looks like a tkinter frame, then that’s what you would do. If you want it to act like a tkinter frame, then you would need to add JavaScript for that.
But no, your server cannot serve tkinter widgets to the browser - the browser isn’t going to know what to do with it.
Please be more detailed and specific about what it is that you’re trying to create here. The term “a message framework” is far to broad to address in any meaningful way.
Ok!
I had a solution to create a Dialogue box like tkinter frame using HTML and CSS, but I meant to say if Django has any feature or external functionality like Tkinter frame so it can be easy to implement and reduce an efforts to make it.
Browsers are limited to rendering HTML.
Again, describing something as functioning “like tkinter frame” is not particularly helpful. If you are more specific with the functionality you wish to implement, we may be able to offer suggestions.
Describe what it is that you’re trying to do without making any reference to another product or tool.
Sure. there is a one file. That file has a button named Info and when the user clicks on the button, the properties of the file should appear there by opening a separate window in Django Template.
So in other words, you’re talking about functionality similar to what the Django Admin does when you click on the “+” icon for adding a new instance of a related field. You want the icon to cause a new window to open with the contents of a view.
To do this, you would make your button an <a ...>
element referring to the url for a view to render the properties, using the target
attribute on that element to cause the link to open a new window.
Note: You may also want to change your way of thinking about templates. Templates are passive components within Django, not active components. The work is done in the views, the templates are just data used to describe how the data being retrieved is to be displayed. You don’t want to think of it as “opening a window in a template” - that’s not accurate. You open a window, and you use a template to describe the data to be displayed in that window.
Okay, Thank you for your response.