fetching events from DB using fullcalendar javascript event calendar

46 views
Skip to first unread message

Andrea Fae'

unread,
Jun 10, 2018, 4:40:03 PM6/10/18
to web2py-users

I'm using web2py and now I'm fetching all calendar events from db using this code in a view:

events: [
    {{for row in rowseventi:}}
        {
            title: '{{=row.evento.titolo}}',
            id: '{{=row.evento.id}}',
            resourceId: '{{=row.evento.risorsa}}',
            start: '{{=row.evento.inizio}}',
            end: '{{=row.evento.fine}}',
            recurring: '{{=row.evento.ricorrenza}}',
            // allDay: false,
            color : '{{=row.evento.colore}}',
            url: '{{=URL('mostra_evento',args=row.evento.id)}}',
       },
       {{pass}}
]

It's working perfectly but now I'd like to fetch only events regarding current view using this function https://fullcalendar.io/docs/events-function

function( start, end, timezone, callback ) { }

There are some example using php but I want only use python and PyDAL. Can someone give me some examples using only python and javascript?

rowseventi it's an array retrieved from controller that contains all events...

When I change the view with "next", "prev" or something else I'd like to fetch the new events based on the dates showed in the view.

Thank you

Richard Vézina

unread,
Jun 13, 2018, 11:01:26 AM6/13/18
to web2py-users
Here I had showed how I was dealing with fullcalendar :


Good luck

Richard

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages