Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

A read-only interface to Team using generic Bootstrap

This document describes the lino_book.projects.bs3 demo project.

Side note: Code snippets (lines starting with >>>) in this document get tested as part of our development workflow. The following initialization snippet tells you which demo project is being used in this document.

>>> from lino import startup
>>> startup('lino_book.projects.bs3.settings.demo')
>>> from lino.api.doctest import *

This project is a read-only public front end of Lino Noi.

It provides read-only anonymous access to the data of lino_book.projects.noi1e, using the lino.modlib.bootstrap3 front end. See also lino_book.projects.public

This does not use lino.modlib.extjs at all.

Tickets are rendered using plain bootstrap HTML:

>>> res = test_client.get('/')
>>> res.status_code
200
>>> soup = BeautifulSoup(res.content, "lxml")
>>> links = soup.find_all('a')
>>> len(links)  
50
>>> print(links[0].get('href'))
/?ul=de
>>> print(links[1].get('href'))
/?ul=fr
>>> print(links[2].get('href'))
#

NB: The len(links) in above snippet is skipped because it gives 49 on some machines and 50 on some others example. No need to explore this until somebody wants to use the bs3 front end.

>>> res = test_client.get('/tickets/Ticket/17')
>>> res.status_code
200
>>> soup = BeautifulSoup(res.content, "lxml")
>>> links = soup.find_all('a')
>>> len(links)
27
>>> print(links[0].get('href'))
/

The following is currently skipped because the demo project has some general issues. See #3857. For example after clicking on ticket #10 in the dashboard it says that this ticket doesn’t exist.

>>> print(soup.get_text(' ', strip=True))
... 
Tickets Sign in — Home en de fr Tickets All tickets Office Recent comments Site About #15 (Bars have no foo) << < > >> State: Closed


(last update ...) Created ... by Jean Site: pypi ... This is Lino Noi ... using ...