Mouse clicks are client side actions. You need javascript to get that data. One solution maybe capturing the mouse clicks at the client side via javascript and sending the data as JSON to your backend by AJAX. Just a suggestion.
On Thursday, 28 October 2021 at 11:24:39 UTC+5:30 Derek wrote: > I am not sure about the others, but certainly for map clicks you'll need > JavaScript e.g. > https://docs.mapbox.com/mapbox-gl-js/example/popup-on-click/ > Of course, the page itself, with JS code links, snippets and supporting > data can be generated via Django in the normal way. > > HTH > > > On Wednesday, 27 October 2021 at 04:03:16 UTC+2 lego.th...@gmail.com > wrote: > >> So there are Python packages out there that can handle mouse movement >> detection locally. But for a Django app, how do we go about do this? >> Clearly we cannot have any processing power on the client machine. Below >> are some examples to be more specific: >> 1 - An e-commerce page where buyer clicks, drags (i.e. holds the mouse) >> and drops a picture of an item from shelf to cart. >> 2 - A web game where player clicks, drags and drops things from one >> location on the screen to another. >> 3 - Web page responds to location of mouse on screen (i.e. coordinates) >> such as GPS-related apps with real map. >> >> Thanks, >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e0774e00-5904-4ca5-bd0e-ae1f8ded84f2n%40googlegroups.com.