[Cubicweb] demote_to_html and main_stream
carlos.balderas at gmail.com
Mon Apr 4 16:58:20 CEST 2011
Adrien, Sylvain, thank you.
I sadly found that any of the possible solutions worked for me. =(
So at this time I decide to use the ajax method directly in fullcalendar
plugin, maybe I should've done this in first time, this way I can take
advantage of the fullcalendar native ajax events.
In the fullcalendar configuration I set this up:
"""return a json object of calendar event(s)
__regid__ = 'calendarevent-json'
templatable = False
content_type = 'application/json'
calendarevent-json returns a json object and debugging in firebug, the view
is called right and returns a json object, but it doesn't display the events
either, just displays an empty calendar, so now I am looking information
about this pb.
I am looking in stackoverflow site and I see this is a common issue in
fullcalendar jquery plugin, from bad data types e.g. "false" instead of
false or incorrect dates format in he json object to some problems with
jquery version compatibility. =S.
I wonder if you had the same pb with fullcalendar's implementation in
cubicweb, so you decided to build the json object in a view's methods and
pass it as array instead of a dynamic json object?
On Fri, Apr 1, 2011 at 12:05 AM, Sylvain Thénault <
sylvain.thenault at logilab.fr> wrote:
> On 31 mars 21:49, Carlos Balderas wrote:
> > Hi,
> Hey Carlos,
> > I'd like to know if someone can give me a clue of how to solve this
> > ERROR: an exception occurred while calling js_update_events_calendar():
> > 'CubicWebTwistedRequestAdapter' object has no attribute 'main_stream'
> see https://www.cubicweb.org/ticket/712309 (read comments as well, there
> is a clue there).
> Aurélien and/or Adrien may give more insight about this?
> > My first question is about the missing "main_stream" attribute, I am not
> > sure why that is, as far as I see It is just about assign another type of
> > value. e.i.
> > TRANSITIONAL_DOCTYPE_NOEXT = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
> > Transitional//EN" "
> > ">\n'
> > My second question is about the use of @xhtmlize decorator, since the
> > I'd like to use uses "demote_to_html" looks like I don't really know what
> > am doing.. =S , so, Is it necesary to use @xhtmlize decorator to return
> > html code by this cubicweb/ajax method?
> yes, you should to that anyway.
> Sylvain Thénault LOGILAB, Paris (France)
> Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
> Développement logiciel sur mesure: http://www.logilab.fr/services
> CubicWeb, the semantic web framework: http://www.cubicweb.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cubicweb