Discussion:
[bottlepy] Any alternative to jQuery?
Sebastian Adil
2017-08-28 21:57:51 UTC
Permalink
Is there an equivalent to "click event" from "jQuery" in python?
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marcel Hellkamp
2017-08-29 08:19:04 UTC
Permalink
Post by Sebastian Adil
Is there an equivalent to "click event" from "jQuery" in python?
No. Click events are client-side only. The server (bottle/python) does
not know what the client does with the response after it was sent.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'gNeandr' via bottlepy
2017-08-29 09:42:22 UTC
Permalink
Not sure what the real point is about.

Basically you can include a button in your html file for the user
action. Clicking that a js script can catch the event and would call a
py function.
Post by Sebastian Adil
Is there an equivalent to "click event" from "jQuery" in python?
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sebastian Adil
2017-08-29 20:00:57 UTC
Permalink
How can a "js script" call a "python function"?
when I talk about jQuery I focus on the "click event"
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'gNeandr' via bottlepy
2017-08-29 21:58:10 UTC
Permalink
Part 1 -- html part: define a button
  <button class='btn btn-default btn-sm dropdown-toggle'
       id ='addJob' title='{{addJob}}' type="button">
       <img title='{{addNewJob}}' src='/static/gplus.png'
style='width:18px'>
  </button>
Part 2 -- a JS fct works with the 'click'
  $('#addJob').on('click', function(event) {
      location.replace("/edit?addJob");
  });
Part 1 and 2 life in a *.tpl template which is basically a html doc
@app.route('/edit')
    caller = request.fullpath[1:]
    qString = request.query_string.strip()
    logSys(" ../" + caller + "  >>" + qString + "<<")
Here request.query_string will hold the 'addJob'.
Yes, it's tricky and just an orientation here =-O
... more details can be found with the bottle docu.
How can a "js script" call a "python function"?
when I talk about jQuery I focus on the "click event"
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sebastian Adil
2017-08-30 20:33:49 UTC
Permalink
The 1st and 2nd parts are clear but the 3rd part is ... difficult :-)
But in any way thank you for your help :-)
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'g Neandr' via bottlepy
2017-08-30 21:33:12 UTC
Permalink
For the difficult part 3 and for a complete picture you could have a look
https://neandr.github.io/piSchedule/en.index.html
https://github.com/neandr/piSchedule
The part 3 in question is in
https://github.com/neandr/piSchedule/blob/master/piSchedule751/piSchedule.py
at line #431 etc

Good look
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...