bip.main package

Submodules

bip.main.forms module

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

Klasy bazowe: bip.utils.forms.BaseForm

Parametry
  • formdata – Used to pass data coming from the enduser, usually request.POST or equivalent. formdata should be some sort of request-data wrapper which can get multiple parameters from the form input, and values are unicode strings, e.g. a Werkzeug/Django/WebOb MultiDict

  • obj – If formdata is empty or not provided, this object is checked for attributes matching form field names, which will be used for field values.

  • prefix – If provided, all fields will have their name prefixed with the value.

  • data – Accept a dictionary of data. This is only used if formdata and obj are not present.

  • meta – If provided, this is a dictionary of values to override attributes on this form’s meta instance.

  • **kwargs – If formdata is empty or not provided and obj does not contain an attribute named the same as a field, form will assign the value of a matching keyword argument to the field, if one exists.

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[bip.utils.menu.MenuItem]

Admin tools menu items.

Zwraca

list of menu items

Typ zwracany

List[MenuItem]

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

Content editor menu items.

Zwraca

list of menu items

Typ zwracany

List[MenuItem]

bip.main.utils.labels() → peewee.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, flask.wrappers.Response]
bip.main.views.page_view(slug: str) → Union[str, flask.wrappers.Response]
bip.main.views.search() → Union[str, flask.wrappers.Response]
bip.main.views.staff()str