ferrosoft.apps.reporting package¶
Subpackages¶
Submodules¶
ferrosoft.apps.reporting.admin module¶
ferrosoft.apps.reporting.apps module¶
ferrosoft.apps.reporting.models module¶
- class ferrosoft.apps.reporting.models.Report(id, creation_time, status, document, func_name, func_args, func_kwargs, return_url)[source]¶
Bases:
UUIDModel- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- creation_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- document¶
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.parentis aForwardManyToOneDescriptorinstance.
- document_id¶
- func_args¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- func_kwargs¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- func_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_creation_time(*, field=<django.db.models.fields.DateTimeField: creation_time>, is_next=True, **kwargs)¶
- get_previous_by_creation_time(*, field=<django.db.models.fields.DateTimeField: creation_time>, is_next=False, **kwargs)¶
- get_status_display(*, field=<django.db.models.fields.IntegerField: status>)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <ferrosoft.apps.reporting.models.ReportManager object>¶
- return_url¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
ferrosoft.apps.reporting.services module¶
- class ferrosoft.apps.reporting.services.Params(owner=None, directory=None, expiry_days=7, file_name=None, return_url=None, media_type='application/pdf')[source]¶
Bases:
object
- ferrosoft.apps.reporting.services.prepare_report(*args, params=None, **kwargs)[source]¶
Prepare an empty report whose contents can be generated by redirecting to Report.get_absolute_url.
- Parameters:
params (
Params) – Parameters for StoredFile and Report.*args – Function object and arguments. This function is called and should return a PDF blob.
**kwargs – Function keyword arguments.
- Return type:
Returns: Report model instance.
ferrosoft.apps.reporting.tasks module¶
ferrosoft.apps.reporting.tests module¶
ferrosoft.apps.reporting.urls module¶
ferrosoft.apps.reporting.views module¶
- class ferrosoft.apps.reporting.views.ReportGeneratorView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,PlatformActivityMixin,DetailView- activity_title = 'Report'¶
Activity title should be a very short label e.g. indicating the current model being operated on.
- get_context_data(**kwargs)[source]¶
Inject activity metadata (title, app, container, help URL) into the context.
- Raises:
RuntimeError – If neither
activity_appnor a stringtemplate_nameis defined and the app label cannot be inferred.
- template_name = 'reporting/generator/index.html'¶