basxbread.contrib.reports package

Submodules

basxbread.contrib.reports.models module

class basxbread.contrib.reports.models.Report(id, created, name, model, filter, custom_queryset, pagination)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

columns

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

created

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

custom_queryset

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

filter
get_next_by_created(*, field=<django.db.models.fields.DateField: created>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateField: created>, is_next=False, **kwargs)
get_reportcolumn_order()
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

model

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

model_id
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
pagination

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property preview
property queryset
set_reportcolumn_order(id_list, using=None)
class basxbread.contrib.reports.models.ReportColumn(id, report, header, column, cell_template, allow_html, aggregation, _order)

Bases: Model

AGGREGATIONS = {'count': '', 'sum': ''}
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

aggregation

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

allow_html

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cell_template

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

column

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_aggregation_display(*, field=<django.db.models.fields.CharField: aggregation>)
get_next_in_order(*, is_next=True)
get_previous_in_order(*, is_next=False)
header

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
render_element(rowvariable: str) BaseElement
report

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

report_id
basxbread.contrib.reports.models.available_report_filters(modelfield, request, report)

basxbread.contrib.reports.urls module

basxbread.contrib.reports.views module

class basxbread.contrib.reports.views.EditView(*args, **kwargs)

Bases: EditView

get_layout()

Returns the layout for this view, returns the layout attribute by default. Either set the layout attribute or override this method.

get_success_url()

Return the URL to redirect to after processing a valid form.

class basxbread.contrib.reports.views.ReadView(*args, **kwargs)

Bases: ReadView

get_layout()

Returns the layout for this view, returns the layout attribute by default. Either set the layout attribute or override this method.

basxbread.contrib.reports.views.exceldownload(request, pk: int)