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.

Files changed (66) hide show
  1. wbreport/__init__.py +1 -0
  2. wbreport/admin.py +87 -0
  3. wbreport/apps.py +6 -0
  4. wbreport/defaults/__init__.py +0 -0
  5. wbreport/defaults/factsheets/__init__.py +0 -0
  6. wbreport/defaults/factsheets/base.py +990 -0
  7. wbreport/defaults/factsheets/menu.py +93 -0
  8. wbreport/defaults/factsheets/mixins.py +35 -0
  9. wbreport/defaults/factsheets/multitheme.py +947 -0
  10. wbreport/dynamic_preferences_registry.py +15 -0
  11. wbreport/factories/__init__.py +8 -0
  12. wbreport/factories/data_classes.py +48 -0
  13. wbreport/factories/reports.py +79 -0
  14. wbreport/filters.py +37 -0
  15. wbreport/migrations/0001_initial_squashed_squashed_0007_report_key.py +238 -0
  16. wbreport/migrations/0008_alter_report_file_content_type.py +25 -0
  17. wbreport/migrations/0009_alter_report_color_palette.py +27 -0
  18. wbreport/migrations/0010_auto_20240103_0947.py +43 -0
  19. wbreport/migrations/0011_auto_20240207_1629.py +35 -0
  20. wbreport/migrations/0012_reportversion_lock.py +17 -0
  21. wbreport/migrations/0013_alter_reportversion_context.py +18 -0
  22. wbreport/migrations/0014_alter_reportcategory_options_and_more.py +25 -0
  23. wbreport/migrations/__init__.py +0 -0
  24. wbreport/mixins.py +183 -0
  25. wbreport/models.py +781 -0
  26. wbreport/pdf/__init__.py +0 -0
  27. wbreport/pdf/charts/__init__.py +0 -0
  28. wbreport/pdf/charts/legend.py +15 -0
  29. wbreport/pdf/charts/pie.py +169 -0
  30. wbreport/pdf/charts/timeseries.py +77 -0
  31. wbreport/pdf/sandbox/__init__.py +0 -0
  32. wbreport/pdf/sandbox/run.py +17 -0
  33. wbreport/pdf/sandbox/templates/__init__.py +0 -0
  34. wbreport/pdf/sandbox/templates/basic_factsheet.py +908 -0
  35. wbreport/pdf/sandbox/templates/fund_factsheet.py +864 -0
  36. wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py +898 -0
  37. wbreport/pdf/sandbox/templates/multistrat_factsheet.py +872 -0
  38. wbreport/pdf/sandbox/templates/testfile.pdf +434 -0
  39. wbreport/pdf/tables/__init__.py +0 -0
  40. wbreport/pdf/tables/aggregated_tables.py +156 -0
  41. wbreport/pdf/tables/data_tables.py +75 -0
  42. wbreport/serializers.py +191 -0
  43. wbreport/tasks.py +60 -0
  44. wbreport/templates/__init__.py +0 -0
  45. wbreport/templatetags/__init__.py +0 -0
  46. wbreport/templatetags/portfolio_tags.py +35 -0
  47. wbreport/tests/__init__.py +0 -0
  48. wbreport/tests/conftest.py +24 -0
  49. wbreport/tests/test_models.py +253 -0
  50. wbreport/tests/test_tasks.py +17 -0
  51. wbreport/tests/test_viewsets.py +0 -0
  52. wbreport/tests/tests.py +12 -0
  53. wbreport/urls.py +29 -0
  54. wbreport/urls_public.py +10 -0
  55. wbreport/viewsets/__init__.py +10 -0
  56. wbreport/viewsets/configs/__init__.py +18 -0
  57. wbreport/viewsets/configs/buttons.py +193 -0
  58. wbreport/viewsets/configs/displays.py +116 -0
  59. wbreport/viewsets/configs/endpoints.py +23 -0
  60. wbreport/viewsets/configs/menus.py +8 -0
  61. wbreport/viewsets/configs/titles.py +30 -0
  62. wbreport/viewsets/viewsets.py +330 -0
  63. wbreport-2.2.1.dist-info/METADATA +6 -0
  64. wbreport-2.2.1.dist-info/RECORD +66 -0
  65. wbreport-2.2.1.dist-info/WHEEL +5 -0
  66. 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
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class WbreportConfig(AppConfig):
5
+ default_auto_field = "django.db.models.BigAutoField"
6
+ name = "wbreport"
File without changes
File without changes