wbreport 1.44.4__tar.gz → 1.45.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wbreport might be problematic. Click here for more details.
- {wbreport-1.44.4 → wbreport-1.45.0}/PKG-INFO +1 -1
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/factsheets/base.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/factsheets/menu.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/factsheets/multitheme.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/factories/data_classes.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/factories/reports.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/filters.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/mixins.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/serializers.py +1 -1
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tasks.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/urls.py +8 -1
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/urls_public.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/__init__.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/__init__.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/buttons.py +2 -1
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/endpoints.py +7 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/titles.py +1 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/viewsets.py +18 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/.gitignore +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/LICENSE +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/pyproject.toml +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/admin.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/apps.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/factsheets/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/defaults/factsheets/mixins.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/dynamic_preferences_registry.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/factories/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/fixtures/wbreport.yaml +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0001_initial_squashed_squashed_0007_report_key.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0008_alter_report_file_content_type.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0009_alter_report_color_palette.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0010_auto_20240103_0947.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0011_auto_20240207_1629.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0012_reportversion_lock.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0013_alter_reportversion_context.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0014_alter_reportcategory_options_and_more.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/models.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/charts/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/charts/legend.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/charts/pie.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/charts/timeseries.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/flowables/risk.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/flowables/textboxes.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/flowables/themes.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/run.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/basic_factsheet.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/fund_factsheet.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/multistrat_factsheet.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/sandbox/templates/testfile.pdf +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/tables/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/tables/aggregated_tables.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/pdf/tables/data_tables.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/templates/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/templatetags/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/templatetags/portfolio_tags.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/__init__.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/conftest.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/test_models.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/test_tasks.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/test_viewsets.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/tests/tests.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/displays.py +0 -0
- {wbreport-1.44.4 → wbreport-1.45.0}/wbreport/viewsets/configs/menus.py +0 -0
|
@@ -60,7 +60,7 @@ class ReportVersionModelSerializer(wb_serializers.ModelSerializer):
|
|
|
60
60
|
if not instance.report.file_disabled:
|
|
61
61
|
res["file"] = reverse("report:reportversion-file", args=[instance.id], request=request)
|
|
62
62
|
|
|
63
|
-
res["html"] = reverse("
|
|
63
|
+
res["html"] = reverse("wbreport:reportversion-rawhtml-list", args=[instance.id], request=request)
|
|
64
64
|
if instance.report.mailing_list:
|
|
65
65
|
res["send_email"] = reverse("report:reportversion-sendemail", args=[instance.id], request=request)
|
|
66
66
|
return res
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from django.urls import include, path
|
|
2
2
|
from wbcore.routers import WBCoreRouter
|
|
3
|
+
|
|
3
4
|
from wbreport.viewsets import viewsets
|
|
4
5
|
|
|
5
6
|
router = WBCoreRouter()
|
|
@@ -25,5 +26,11 @@ router.register(r"reportcategory", viewsets.ReportCategoryModelViewSet, basename
|
|
|
25
26
|
report_router = WBCoreRouter()
|
|
26
27
|
report_router.register(r"version", viewsets.ReportVersionReportModelViewSet, basename="report-version")
|
|
27
28
|
|
|
29
|
+
report_version_router = WBCoreRouter()
|
|
30
|
+
report_version_router.register(r"rawhtml", viewsets.ReportVersionReportHTMLViewSet, basename="reportversion-rawhtml")
|
|
28
31
|
|
|
29
|
-
urlpatterns = [
|
|
32
|
+
urlpatterns = [
|
|
33
|
+
path("", include(router.urls)),
|
|
34
|
+
path("report/<int:report_id>/", include(report_router.urls)),
|
|
35
|
+
path("reportversion/<int:report_version_id>/", include(report_version_router.urls)),
|
|
36
|
+
]
|
|
@@ -6,6 +6,7 @@ from wbcore.metadata.configs.buttons.view_config import ButtonViewConfig
|
|
|
6
6
|
from wbcore.metadata.configs.display.instance_display.shortcuts import (
|
|
7
7
|
create_simple_display,
|
|
8
8
|
)
|
|
9
|
+
|
|
9
10
|
from wbreport.models import Report
|
|
10
11
|
|
|
11
12
|
|
|
@@ -147,7 +148,7 @@ class ReportButtonConfig(ButtonViewConfig):
|
|
|
147
148
|
class ReportVersionButtonConfig(ButtonViewConfig):
|
|
148
149
|
def get_custom_list_instance_buttons(self):
|
|
149
150
|
return {
|
|
150
|
-
bt.
|
|
151
|
+
bt.WidgetButton(
|
|
151
152
|
key="html",
|
|
152
153
|
label="Report (HTML)",
|
|
153
154
|
icon=WBIcon.LINK.icon,
|
|
@@ -21,3 +21,10 @@ class ReportEndpointConfig(EndpointViewConfig):
|
|
|
21
21
|
class ReportVersionReportEndpointConfig(EndpointViewConfig):
|
|
22
22
|
def get_list_endpoint(self, **kwargs):
|
|
23
23
|
return reverse("wbreport:report-version-list", args=[self.view.kwargs["report_id"]], request=self.request)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ReportVersionReportHTMEndpointConfig(EndpointViewConfig):
|
|
27
|
+
def get_list_endpoint(self, **kwargs):
|
|
28
|
+
return reverse(
|
|
29
|
+
"wbreport:reportversion-rawhtml-list", args=[self.view.kwargs["report_version_id"]], request=self.request
|
|
30
|
+
)
|
|
@@ -21,6 +21,7 @@ from wbcore.contrib.authentication.authentication import (
|
|
|
21
21
|
QueryTokenAuthentication,
|
|
22
22
|
)
|
|
23
23
|
from wbcore.contrib.guardian.viewsets.mixins import GuardianFilterMixin
|
|
24
|
+
|
|
24
25
|
from wbreport.filters import ReportFilterSet, ReportVersionFilterSet
|
|
25
26
|
from wbreport.models import (
|
|
26
27
|
Report,
|
|
@@ -54,6 +55,7 @@ from wbreport.viewsets.configs import (
|
|
|
54
55
|
ReportVersionEndpointConfig,
|
|
55
56
|
ReportVersionReportDisplayConfig,
|
|
56
57
|
ReportVersionReportEndpointConfig,
|
|
58
|
+
ReportVersionReportHTMEndpointConfig,
|
|
57
59
|
ReportVersionReportTitleConfig,
|
|
58
60
|
ReportVersionTitleConfig,
|
|
59
61
|
)
|
|
@@ -328,3 +330,19 @@ class ReportVersionReportModelViewSet(ReportVersionModelViewSet):
|
|
|
328
330
|
if report.is_accessible(self.request.user):
|
|
329
331
|
return super().get_queryset().filter(report=self.kwargs["report_id"])
|
|
330
332
|
return ReportVersion.objects.none()
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
class ReportVersionReportHTMLViewSet(viewsets.HTMLViewSet):
|
|
336
|
+
IDENTIFIER = "wbreport:reportversion-rawhtml"
|
|
337
|
+
queryset = ReportVersion.objects.all()
|
|
338
|
+
|
|
339
|
+
endpoint_config_class = ReportVersionReportHTMEndpointConfig
|
|
340
|
+
|
|
341
|
+
def get_queryset(self):
|
|
342
|
+
return super().get_queryset().filter(id=self.kwargs["report_version_id"])
|
|
343
|
+
|
|
344
|
+
def get_html(self, queryset) -> str:
|
|
345
|
+
version = get_object_or_404(ReportVersion, id=self.kwargs["report_version_id"])
|
|
346
|
+
if version.report.is_accessible(self.request.user):
|
|
347
|
+
return version.generate_html()
|
|
348
|
+
return ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wbreport-1.44.4 → wbreport-1.45.0}/wbreport/migrations/0008_alter_report_file_content_type.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|