Is it reasonably easy easy to something like this with python?

Discussion in 'Python' started by Bruno Desthuilliers, Aug 25, 2007.

  1. Gerardo Herzig a écrit :
    > walterbyrd wrote:
    >
    >> This is made with a php5 framework called qcodo.
    >>
    >> http://examples.qcodo.com/examples/dynamic/inline_editing.php
    >>
    >> With qcodo it's easy to make grids that are sortable and inline
    >> editable. Qcodo grids work from the database - not an xml table or
    >> array. Qcodo handles complex data relations, and fairly large
    >> datadabes.
    >>
    >> I like python better than php, but I don't know of any python tools to
    >> create these sorts of grids.
    >>
    >>
    >>

    > The one who make that table sorteable is AJAX. Not php. The php part is
    > kind of trivial (so it would be `trivial' in python too). It just reads
    > some data and format it in an html table.


    FWIW, Pylons have all sorts of javascript/ajax helpers (using
    prototype.js).
    Bruno Desthuilliers, Aug 25, 2007
    #1
    1. Advertising

  2. Bruno Desthuilliers

    walterbyrd Guest

    This is made with a php5 framework called qcodo.

    http://examples.qcodo.com/examples/dynamic/inline_editing.php

    With qcodo it's easy to make grids that are sortable and inline
    editable. Qcodo grids work from the database - not an xml table or
    array. Qcodo handles complex data relations, and fairly large
    datadabes.

    I like python better than php, but I don't know of any python tools to
    create these sorts of grids.
    walterbyrd, Aug 28, 2007
    #2
    1. Advertising

  3. walterbyrd wrote:

    >This is made with a php5 framework called qcodo.
    >
    >http://examples.qcodo.com/examples/dynamic/inline_editing.php
    >
    >With qcodo it's easy to make grids that are sortable and inline
    >editable. Qcodo grids work from the database - not an xml table or
    >array. Qcodo handles complex data relations, and fairly large
    >datadabes.
    >
    >I like python better than php, but I don't know of any python tools to
    >create these sorts of grids.
    >
    >
    >

    The one who make that table sorteable is AJAX. Not php. The php part is
    kind of trivial (so it would be `trivial' in python too). It just reads
    some data and format it in an html table.

    Cheers.
    Gerardo
    Gerardo Herzig, Aug 28, 2007
    #3
  4. Bruno Desthuilliers

    walterbyrd Guest

    On Aug 28, 1:31 pm, Gerardo Herzig <> wrote:
    > walterbyrd wrote:


    > The one who make that table sorteable is AJAX. Not php. The php part is
    > kind of trivial (so it would be `trivial' in python too). It just reads
    > some data and format it in an html table.



    Thank you, that is great to know. What if there were 1000 records, and
    the table was paginated? I suppose, ajax would sort the front end, and
    backend language, and database, would soft behind the scene, or
    something?
    walterbyrd, Aug 28, 2007
    #4
  5. walterbyrd wrote:

    >On Aug 28, 1:31 pm, Gerardo Herzig <> wrote:
    >
    >
    >>walterbyrd wrote:
    >>
    >>

    >
    >
    >
    >>The one who make that table sorteable is AJAX. Not php. The php part is
    >>kind of trivial (so it would be `trivial' in python too). It just reads
    >>some data and format it in an html table.
    >>
    >>

    >
    >
    >Thank you, that is great to know. What if there were 1000 records, and
    >the table was paginated? I suppose, ajax would sort the front end, and
    >backend language, and database, would soft behind the scene, or
    >something?
    >
    >
    >

    Im not an AJAX expert (not even close actually. In fact i just used it
    once), but seems like you will have to reload all the page (all the
    table at least). Because now is a different scenario. If the table is
    paginated, it looks like you will send, say 50 results at one time, then
    (when pressing 'next 50'), anhoter 50, and so on. So AJAX only will
    have THOSE 50 for ordering. Another approach would be returning de
    entire recordset, and implement all the 'next' and 'previous' links via
    AJAX. And i dont think you will like to send the entire result. I dont.

    What will i do (at least from WIK for now), is having a set of `hrefs'
    (maybe with some nice arrows) in all of the table headers, to indicate
    the desired order you want to get. And, if you have a column table named
    'age', you will make those href like
    '<a
    href=showmethetable.py?columnorder=age&ordertype=asc><nice_arrow_graphic>'

    then your cgi python script will take that mess after the ? sign, parse
    it (via cgi module perhaps), and make a new query, with the 'order by
    age asc' clause, wich are the 'arguments' in the url.

    There is allways a lot of ways to do some stuff. I will check into de
    AJAX list too!

    Cheers.
    Gerardo
    Gerardo Herzig, Aug 28, 2007
    #5
  6. walterbyrd a écrit :
    > On Aug 28, 1:31 pm, Gerardo Herzig <> wrote:
    >> walterbyrd wrote:

    >
    >> The one who make that table sorteable is AJAX. Not php. The php part is
    >> kind of trivial (so it would be `trivial' in python too). It just reads
    >> some data and format it in an html table.

    >
    >
    > Thank you, that is great to know. What if there were 1000 records, and
    > the table was paginated?
    >
    > I suppose, ajax would sort the front end,


    s/ajax/javascript/

    You don't need ajax to sort a table, it's pure javascript dom
    manipulation (and there are quite a lot of working, correctly written
    and well-tested scripts doing so).

    In your above use case (sortable, paginated, inline-editable grid), ajax
    would be used to:
    - retrieve XXX records from the back-end (either as an html fragment or
    in json) via a GET request
    - submit modifications (via a POST request)

    All the rest is either usual javascript or usual (backend) web programming.
    Bruno Desthuilliers, Aug 29, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    423
    Otis Mukinfus
    Jan 29, 2006
  2. Roedy Green

    Class.forName reasonably efficient

    Roedy Green, Jan 14, 2006, in forum: Java
    Replies:
    4
    Views:
    448
    Dave Glasser
    Jan 15, 2006
  3. Larry goodman

    reasonably priced reporting solution

    Larry goodman, Oct 15, 2003, in forum: Python
    Replies:
    5
    Views:
    350
    Larry goodman
    Oct 16, 2003
  4. ruby talk
    Replies:
    3
    Views:
    111
    Florian Frank
    Jan 27, 2005
  5. Keith Thompson

    Reasonably priced C11 standard?

    Keith Thompson, Jan 25, 2012, in forum: C Programming
    Replies:
    85
    Views:
    2,486
    Deirdre
    Apr 6, 2012
Loading...

Share This Page