wbreport 2.2.1__py2.py3-none-any.whl
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/__init__.py +1 -0
- wbreport/admin.py +87 -0
- wbreport/apps.py +6 -0
- wbreport/defaults/__init__.py +0 -0
- wbreport/defaults/factsheets/__init__.py +0 -0
- wbreport/defaults/factsheets/base.py +990 -0
- wbreport/defaults/factsheets/menu.py +93 -0
- wbreport/defaults/factsheets/mixins.py +35 -0
- wbreport/defaults/factsheets/multitheme.py +947 -0
- wbreport/dynamic_preferences_registry.py +15 -0
- wbreport/factories/__init__.py +8 -0
- wbreport/factories/data_classes.py +48 -0
- wbreport/factories/reports.py +79 -0
- wbreport/filters.py +37 -0
- wbreport/migrations/0001_initial_squashed_squashed_0007_report_key.py +238 -0
- wbreport/migrations/0008_alter_report_file_content_type.py +25 -0
- wbreport/migrations/0009_alter_report_color_palette.py +27 -0
- wbreport/migrations/0010_auto_20240103_0947.py +43 -0
- wbreport/migrations/0011_auto_20240207_1629.py +35 -0
- wbreport/migrations/0012_reportversion_lock.py +17 -0
- wbreport/migrations/0013_alter_reportversion_context.py +18 -0
- wbreport/migrations/0014_alter_reportcategory_options_and_more.py +25 -0
- wbreport/migrations/__init__.py +0 -0
- wbreport/mixins.py +183 -0
- wbreport/models.py +781 -0
- wbreport/pdf/__init__.py +0 -0
- wbreport/pdf/charts/__init__.py +0 -0
- wbreport/pdf/charts/legend.py +15 -0
- wbreport/pdf/charts/pie.py +169 -0
- wbreport/pdf/charts/timeseries.py +77 -0
- wbreport/pdf/sandbox/__init__.py +0 -0
- wbreport/pdf/sandbox/run.py +17 -0
- wbreport/pdf/sandbox/templates/__init__.py +0 -0
- wbreport/pdf/sandbox/templates/basic_factsheet.py +908 -0
- wbreport/pdf/sandbox/templates/fund_factsheet.py +864 -0
- wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py +898 -0
- wbreport/pdf/sandbox/templates/multistrat_factsheet.py +872 -0
- wbreport/pdf/sandbox/templates/testfile.pdf +434 -0
- wbreport/pdf/tables/__init__.py +0 -0
- wbreport/pdf/tables/aggregated_tables.py +156 -0
- wbreport/pdf/tables/data_tables.py +75 -0
- wbreport/serializers.py +191 -0
- wbreport/tasks.py +60 -0
- wbreport/templates/__init__.py +0 -0
- wbreport/templatetags/__init__.py +0 -0
- wbreport/templatetags/portfolio_tags.py +35 -0
- wbreport/tests/__init__.py +0 -0
- wbreport/tests/conftest.py +24 -0
- wbreport/tests/test_models.py +253 -0
- wbreport/tests/test_tasks.py +17 -0
- wbreport/tests/test_viewsets.py +0 -0
- wbreport/tests/tests.py +12 -0
- wbreport/urls.py +29 -0
- wbreport/urls_public.py +10 -0
- wbreport/viewsets/__init__.py +10 -0
- wbreport/viewsets/configs/__init__.py +18 -0
- wbreport/viewsets/configs/buttons.py +193 -0
- wbreport/viewsets/configs/displays.py +116 -0
- wbreport/viewsets/configs/endpoints.py +23 -0
- wbreport/viewsets/configs/menus.py +8 -0
- wbreport/viewsets/configs/titles.py +30 -0
- wbreport/viewsets/viewsets.py +330 -0
- wbreport-2.2.1.dist-info/METADATA +6 -0
- wbreport-2.2.1.dist-info/RECORD +66 -0
- wbreport-2.2.1.dist-info/WHEEL +5 -0
- wbreport-2.2.1.dist-info/licenses/LICENSE +4 -0
wbreport/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0"
|
wbreport/admin.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from django.contrib import admin
|
|
2
|
+
from guardian.admin import GuardedModelAdmin
|
|
3
|
+
|
|
4
|
+
from .models import Report, ReportAsset, ReportCategory, ReportClass, ReportVersion
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@admin.register(ReportAsset)
|
|
8
|
+
class ReportAssetModelAdmin(admin.ModelAdmin):
|
|
9
|
+
list_display = ["key", "asset", "text"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@admin.register(ReportCategory)
|
|
13
|
+
class ReportCategoryModelAdmin(admin.ModelAdmin):
|
|
14
|
+
list_display = ["title"]
|
|
15
|
+
search_fields = ("title",)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@admin.register(ReportClass)
|
|
19
|
+
class ReportClassModelAdmin(admin.ModelAdmin):
|
|
20
|
+
list_display = ["title"]
|
|
21
|
+
search_fields = ("title",)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@admin.register(ReportVersion)
|
|
25
|
+
class ReportVersionModelAdmin(admin.ModelAdmin):
|
|
26
|
+
list_display = ["title", "uuid", "disabled", "is_primary", "creation_date", "update_date"]
|
|
27
|
+
search_fields = ("title",)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ReportVersionTabularInline(admin.TabularInline):
|
|
31
|
+
model = ReportVersion
|
|
32
|
+
fields = ["title", "disabled", "is_primary", "parameters"]
|
|
33
|
+
readonly_fields = ("creation_date", "update_date", "uuid")
|
|
34
|
+
extra = 0
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ReportTabularInline(admin.TabularInline):
|
|
38
|
+
model = Report
|
|
39
|
+
fields = ["title", "is_active", "permission_type"]
|
|
40
|
+
extra = 0
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@admin.register(Report)
|
|
44
|
+
class ReportModelAdmin(GuardedModelAdmin):
|
|
45
|
+
list_display = ["title", "key", "category", "is_active", "permission_type"]
|
|
46
|
+
search_fields = (
|
|
47
|
+
"title",
|
|
48
|
+
"key",
|
|
49
|
+
"category__title",
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
fieldsets = (
|
|
53
|
+
(
|
|
54
|
+
"Main Information",
|
|
55
|
+
{
|
|
56
|
+
"fields": (
|
|
57
|
+
("title", "namespace", "category", "logo_file"),
|
|
58
|
+
("is_active", "permission_type", "mailing_list"),
|
|
59
|
+
("key", "base_color", "color_palette"),
|
|
60
|
+
(
|
|
61
|
+
"report_class",
|
|
62
|
+
"parent_report",
|
|
63
|
+
),
|
|
64
|
+
(
|
|
65
|
+
"file_content_type",
|
|
66
|
+
"file_disabled",
|
|
67
|
+
),
|
|
68
|
+
("parameters",),
|
|
69
|
+
)
|
|
70
|
+
},
|
|
71
|
+
),
|
|
72
|
+
(
|
|
73
|
+
"Generic Content Type",
|
|
74
|
+
{
|
|
75
|
+
"fields": (
|
|
76
|
+
"content_type",
|
|
77
|
+
"object_id",
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
),
|
|
81
|
+
)
|
|
82
|
+
inlines = [ReportVersionTabularInline]
|
|
83
|
+
autocomplete_fields = [
|
|
84
|
+
"content_type",
|
|
85
|
+
"report_class",
|
|
86
|
+
"category",
|
|
87
|
+
]
|
wbreport/apps.py
ADDED
|
File without changes
|
|
File without changes
|