bip.main package

Submodules

bip.main.forms module

class bip.main.forms.SearchForm(*args, **kwargs)

Klasy bazowe: BaseForm

Parametry:
  • formdata – Input data coming from the client, usually request.form or equivalent. Should provide a „multi dict” interface to get a list of values for a given key, such as what Werkzeug, Django, and WebOb provide.

  • obj – Take existing data from attributes on this object matching form field attributes. Only used if formdata is not passed.

  • prefix – If provided, all fields will have their name prefixed with the value. This is for distinguishing multiple forms on a single page. This only affects the HTML name for matching input data, not the Python name for matching existing data.

  • data – Take existing data from keys in this dict matching form field attributes. obj takes precedence if it also has a matching attribute. Only used if formdata is not passed.

  • meta – A dict of attributes to override on this form’s meta instance.

  • extra_filters – A dict mapping field attribute names to lists of extra filter functions to run. Extra filters run after filters passed when creating the field. If the form has filter_<fieldname>, it is the last extra filter.

  • kwargs – Merged with data to allow passing existing data as parameters. Overwrites any duplicate keys in data. Only used if formdata is not passed.

attachments = <UnboundField(BooleanField, ('załączniki',), {'default': True})>
buttons = [Button(type_='submit', class_='primary', icon='check', icon_type='fas', text='szukaj')]
labels = <UnboundField(BooleanField, ('etykiety',), {'default': True})>
pages = <UnboundField(BooleanField, ('strony',), {'default': True})>
q = <UnboundField(StringField, ('wyszukaj',), {})>

bip.main.templates module

bip.main.templates.extra_context() dict

Things to be added to Jinja context.

Zwraca:

extra context items

Typ zwracany:

dict

bip.main.utils module

bip.main.utils.admin_tools() List[MenuItem]

Admin tools menu items.

Zwraca:

list of menu items

Typ zwracany:

List[MenuItem]

bip.main.utils.editor_tools() List[MenuItem]

Content editor menu items.

Zwraca:

list of menu items

Typ zwracany:

List[MenuItem]

bip.main.utils.labels() ModelSelect

Function returns query over labels annotated with count of pages.

Only labels that have any page are returned.

Zwraca:

Label query object

Typ zwracany:

peewee.ModelSelect

Links to pages to be displayed as menu items.

Yield:

menu item

Typ zwracany:

Generator[MenuItem, None, None]

bip.main.views module

bip.main.views.basic_information() str
bip.main.views.changes() str
bip.main.views.contact() str
bip.main.views.home() str
bip.main.views.label_page_list(slug: str) Union[str, Response]
bip.main.views.page_view(slug: str) Union[str, Response]
bip.main.views.search() Union[str, Response]
bip.main.views.staff() str