Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
General¶
doctest init:
>>> import lino
>>> lino.startup('lino_book.projects.voga1.settings')
>>> from lino.api.doctest import *
>>> print(analyzer.show_complexity_factors())
...
- 48 plugins
- 94 models
- 6 user types
- 351 views
- 31 dialog actions
The following caused an [ERROR ‘AnonymousUser’ object has no attribute ‘event_type’ in ‘[show cal.UpcomingEvents]’ at position 0-25] because the memo user, used by the parser is both an AnonymousUser and has user_type SiteAdmin. Lino was confused and tried to add a button for the ShowInsert action.
>>> html = dd.plugins.memo.parser.parse("[show cal.UpcomingEvents]")
>>> print(beautiful_soup(html).prettify())
<html>
 <body>
  <h1>
   Upcoming events (Dates 22.10.2020 to ...)
   <a href='javascript:Lino.cal.UpcomingEvents.grid.run(null,{
       "base_params": {  },
       "param_values": {
         "end_date": null, "event_type": null, "event_typeHidden": null,
         "presence_guest": null, "presence_guestHidden": null, "room": null,
         "roomHidden": null, "start_date": "22.10.2020", "user": null,
         "userHidden": null } })'
      style="text-decoration:none;"
      title="Show this table in own window">
    ⏏
   </a>
  </h1>
  <table>
   <tbody>
    No data to display
   </tbody>
  </table>
 </body>
</html>