django-cfg 1.4.116__py3-none-any.whl → 1.5.14__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 django-cfg might be problematic. Click here for more details.
- django_cfg/__init__.py +6 -1
- django_cfg/apps/api/commands/serializers.py +152 -0
- django_cfg/apps/api/commands/views.py +32 -0
- django_cfg/apps/{accounts → business/accounts}/admin/inlines.py +2 -2
- django_cfg/apps/{accounts → business/accounts}/admin/user_admin.py +2 -2
- django_cfg/apps/{accounts → business/accounts}/apps.py +2 -2
- django_cfg/apps/{accounts → business/accounts}/management/commands/otp_test.py +5 -2
- django_cfg/apps/{accounts → business/accounts}/managers/user_manager.py +2 -2
- django_cfg/apps/{accounts → business/accounts}/migrations/0001_initial.py +4 -4
- django_cfg/apps/{agents → business/agents}/__init__.py +1 -1
- django_cfg/apps/{agents → business/agents}/apps.py +1 -1
- django_cfg/apps/business/agents/management/commands/create_agent.py +177 -0
- django_cfg/apps/{agents/management/commands/create_agent.py → business/agents/management/commands/load_agent_templates.py} +6 -167
- django_cfg/apps/{agents → business/agents}/management/commands/orchestrator_status.py +7 -5
- django_cfg/apps/{knowbase → business/knowbase}/__init__.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/apps.py +3 -3
- django_cfg/apps/business/knowbase/examples/__init__.py +3 -0
- django_cfg/apps/{knowbase → business/knowbase}/examples/external_data_usage.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/management/commands/knowbase_stats.py +4 -2
- django_cfg/apps/{knowbase → business/knowbase}/management/commands/setup_knowbase.py +4 -2
- django_cfg/apps/{knowbase → business/knowbase}/mixins/examples/vehicle_model_example.py +2 -2
- django_cfg/apps/{knowbase → business/knowbase}/mixins/service.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/models/external_data.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/services/archive/vectorization_service.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/services/embedding/async_processor.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/services/embedding/batch_processor.py +2 -2
- django_cfg/apps/{knowbase → business/knowbase}/services/embedding/processors.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/services/embedding/utils.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/tasks/document_processing.py +1 -1
- django_cfg/apps/{knowbase → business/knowbase}/utils/chunk_settings.py +6 -5
- django_cfg/apps/{knowbase → business/knowbase}/views/archive_views.py +2 -2
- django_cfg/apps/{leads → business/leads}/apps.py +2 -2
- django_cfg/apps/{newsletter → business/newsletter}/admin/newsletter_admin.py +12 -11
- django_cfg/apps/{newsletter → business/newsletter}/apps.py +2 -2
- django_cfg/apps/{newsletter → business/newsletter}/management/commands/test_newsletter.py +7 -4
- django_cfg/apps/{payments → business/payments}/__init__.py +2 -2
- django_cfg/apps/{payments → business/payments}/admin/balance_admin.py +26 -36
- django_cfg/apps/{payments → business/payments}/admin/payment_admin.py +65 -85
- django_cfg/apps/{payments → business/payments}/admin/withdrawal_admin.py +65 -100
- django_cfg/apps/{payments → business/payments}/apps.py +1 -1
- django_cfg/apps/{payments → business/payments}/management/commands/check_payment_status.py +8 -6
- django_cfg/apps/{payments → business/payments}/management/commands/create_payment.py +7 -5
- django_cfg/apps/{payments → business/payments}/management/commands/sync_currencies.py +6 -4
- django_cfg/apps/{payments → business/payments}/urls.py +1 -1
- django_cfg/apps/{support → business/support}/apps.py +1 -1
- django_cfg/apps/{support → business/support}/managers/message_manager.py +1 -1
- django_cfg/apps/{support → business/support}/managers/ticket_manager.py +1 -1
- django_cfg/apps/{centrifugo → integrations/centrifugo}/__init__.py +2 -2
- django_cfg/apps/integrations/centrifugo/_cfg/README_DEPENDENCIES.md +260 -0
- django_cfg/apps/integrations/centrifugo/_cfg/__init__.py +25 -0
- django_cfg/apps/integrations/centrifugo/_cfg/check_deps.py +34 -0
- django_cfg/apps/integrations/centrifugo/_cfg/dependencies.py +309 -0
- django_cfg/apps/{centrifugo → integrations/centrifugo}/admin/centrifugo_log.py +33 -71
- django_cfg/apps/integrations/centrifugo/apps.py +100 -0
- django_cfg/apps/{centrifugo → integrations/centrifugo}/management/commands/generate_centrifugo_clients.py +9 -9
- django_cfg/apps/{centrifugo → integrations/centrifugo}/serializers/__init__.py +4 -3
- django_cfg/apps/integrations/centrifugo/serializers/publishes.py +38 -0
- django_cfg/apps/{centrifugo → integrations/centrifugo}/serializers/stats.py +2 -2
- django_cfg/apps/{centrifugo → integrations/centrifugo}/services/client/client.py +2 -2
- django_cfg/apps/{centrifugo → integrations/centrifugo}/services/client/config.py +1 -1
- django_cfg/apps/{centrifugo → integrations/centrifugo}/views/monitoring.py +28 -43
- django_cfg/apps/integrations/grpc/__init__.py +9 -0
- django_cfg/apps/integrations/grpc/_cfg/README_DEPENDENCIES.md +307 -0
- django_cfg/apps/integrations/grpc/_cfg/__init__.py +25 -0
- django_cfg/apps/integrations/grpc/_cfg/check_deps.py +34 -0
- django_cfg/apps/integrations/grpc/_cfg/dependencies.py +484 -0
- django_cfg/apps/integrations/grpc/admin/__init__.py +17 -0
- django_cfg/apps/integrations/grpc/admin/config.py +261 -0
- django_cfg/apps/integrations/grpc/admin/grpc_api_key.py +129 -0
- django_cfg/apps/integrations/grpc/admin/grpc_request_log.py +261 -0
- django_cfg/apps/integrations/grpc/admin/grpc_server_status.py +236 -0
- django_cfg/apps/integrations/grpc/apps.py +108 -0
- django_cfg/apps/integrations/grpc/auth/__init__.py +17 -0
- django_cfg/apps/integrations/grpc/auth/api_key_auth.py +320 -0
- django_cfg/apps/integrations/grpc/interceptors/__init__.py +19 -0
- django_cfg/apps/integrations/grpc/interceptors/errors.py +241 -0
- django_cfg/apps/integrations/grpc/interceptors/logging.py +267 -0
- django_cfg/apps/integrations/grpc/interceptors/metrics.py +307 -0
- django_cfg/apps/integrations/grpc/interceptors/request_logger.py +535 -0
- django_cfg/apps/integrations/grpc/management/__init__.py +1 -0
- django_cfg/apps/integrations/grpc/management/commands/generate_protos.py +130 -0
- django_cfg/apps/integrations/grpc/management/commands/rungrpc.py +518 -0
- django_cfg/apps/integrations/grpc/management/commands/test_grpc_integration.py +75 -0
- django_cfg/apps/integrations/grpc/managers/__init__.py +14 -0
- django_cfg/apps/integrations/grpc/managers/grpc_api_key.py +192 -0
- django_cfg/apps/integrations/grpc/managers/grpc_request_log.py +310 -0
- django_cfg/apps/integrations/grpc/managers/grpc_server_status.py +296 -0
- django_cfg/apps/integrations/grpc/migrations/0001_initial.py +69 -0
- django_cfg/apps/integrations/grpc/migrations/0002_rename_django_cfg__service_4c4a8e_idx_django_cfg__service_584308_idx_and_more.py +38 -0
- django_cfg/apps/integrations/grpc/migrations/0003_grpcserverstatus.py +119 -0
- django_cfg/apps/integrations/grpc/migrations/0004_grpcserverstatus_registered_services.py +22 -0
- django_cfg/apps/integrations/grpc/migrations/0005_grpcapikey.py +143 -0
- django_cfg/apps/integrations/grpc/migrations/0006_grpcrequestlog_api_key_and_more.py +34 -0
- django_cfg/apps/integrations/grpc/models/__init__.py +13 -0
- django_cfg/apps/integrations/grpc/models/grpc_api_key.py +198 -0
- django_cfg/apps/integrations/grpc/models/grpc_request_log.py +230 -0
- django_cfg/apps/integrations/grpc/models/grpc_server_status.py +305 -0
- django_cfg/apps/integrations/grpc/serializers/__init__.py +83 -0
- django_cfg/apps/integrations/grpc/serializers/api_keys.py +63 -0
- django_cfg/apps/integrations/grpc/serializers/charts.py +216 -0
- django_cfg/apps/integrations/grpc/serializers/config.py +120 -0
- django_cfg/apps/integrations/grpc/serializers/health.py +18 -0
- django_cfg/apps/integrations/grpc/serializers/proto_files.py +74 -0
- django_cfg/apps/integrations/grpc/serializers/requests.py +24 -0
- django_cfg/apps/integrations/grpc/serializers/service_registry.py +260 -0
- django_cfg/apps/integrations/grpc/serializers/services.py +32 -0
- django_cfg/apps/integrations/grpc/serializers/stats.py +60 -0
- django_cfg/apps/integrations/grpc/serializers/testing.py +113 -0
- django_cfg/apps/integrations/grpc/services/__init__.py +41 -0
- django_cfg/apps/integrations/grpc/services/base.py +375 -0
- django_cfg/apps/integrations/grpc/services/chart_generator.py +475 -0
- django_cfg/apps/integrations/grpc/services/config_helper.py +146 -0
- django_cfg/apps/integrations/grpc/services/discovery.py +571 -0
- django_cfg/apps/integrations/grpc/services/grpc_client.py +590 -0
- django_cfg/apps/integrations/grpc/services/monitoring_service.py +397 -0
- django_cfg/apps/integrations/grpc/services/proto_files_manager.py +268 -0
- django_cfg/apps/integrations/grpc/services/service_registry.py +330 -0
- django_cfg/apps/integrations/grpc/services/testing_service.py +321 -0
- django_cfg/apps/integrations/grpc/testing/__init__.py +12 -0
- django_cfg/apps/integrations/grpc/testing/examples.py +263 -0
- django_cfg/apps/integrations/grpc/urls.py +47 -0
- django_cfg/apps/integrations/grpc/utils/__init__.py +9 -0
- django_cfg/apps/integrations/grpc/utils/integration_test.py +334 -0
- django_cfg/apps/integrations/grpc/utils/proto_gen.py +463 -0
- django_cfg/apps/integrations/grpc/utils/streaming_logger.py +177 -0
- django_cfg/apps/integrations/grpc/views/__init__.py +19 -0
- django_cfg/apps/integrations/grpc/views/api_keys.py +255 -0
- django_cfg/apps/integrations/grpc/views/charts.py +224 -0
- django_cfg/apps/integrations/grpc/views/config.py +193 -0
- django_cfg/apps/integrations/grpc/views/monitoring.py +360 -0
- django_cfg/apps/integrations/grpc/views/proto_files.py +214 -0
- django_cfg/apps/integrations/grpc/views/services.py +298 -0
- django_cfg/apps/integrations/grpc/views/testing.py +308 -0
- django_cfg/apps/integrations/rq/__init__.py +9 -0
- django_cfg/apps/integrations/rq/_cfg/__init__.py +28 -0
- django_cfg/apps/integrations/rq/_cfg/dependencies.py +313 -0
- django_cfg/apps/integrations/rq/apps.py +157 -0
- django_cfg/apps/integrations/rq/management/__init__.py +1 -0
- django_cfg/apps/integrations/rq/management/commands/__init__.py +1 -0
- django_cfg/apps/integrations/rq/management/commands/rqscheduler.py +31 -0
- django_cfg/apps/integrations/rq/management/commands/rqstats.py +33 -0
- django_cfg/apps/integrations/rq/management/commands/rqworker.py +31 -0
- django_cfg/apps/integrations/rq/management/commands/rqworker_pool.py +27 -0
- django_cfg/apps/integrations/rq/serializers/__init__.py +40 -0
- django_cfg/apps/integrations/rq/serializers/health.py +60 -0
- django_cfg/apps/integrations/rq/serializers/job.py +100 -0
- django_cfg/apps/integrations/rq/serializers/queue.py +80 -0
- django_cfg/apps/integrations/rq/serializers/schedule.py +178 -0
- django_cfg/apps/integrations/rq/serializers/testing.py +139 -0
- django_cfg/apps/integrations/rq/serializers/worker.py +58 -0
- django_cfg/apps/integrations/rq/services/__init__.py +25 -0
- django_cfg/apps/integrations/rq/services/config_helper.py +233 -0
- django_cfg/apps/integrations/rq/services/models/README.md +417 -0
- django_cfg/apps/integrations/rq/services/models/__init__.py +30 -0
- django_cfg/apps/integrations/rq/services/models/event.py +123 -0
- django_cfg/apps/integrations/rq/services/models/job.py +99 -0
- django_cfg/apps/integrations/rq/services/models/queue.py +92 -0
- django_cfg/apps/integrations/rq/services/models/worker.py +104 -0
- django_cfg/apps/integrations/rq/services/rq_converters.py +183 -0
- django_cfg/apps/integrations/rq/tasks/__init__.py +23 -0
- django_cfg/apps/integrations/rq/tasks/demo_tasks.py +284 -0
- django_cfg/apps/integrations/rq/urls.py +54 -0
- django_cfg/apps/integrations/rq/views/__init__.py +19 -0
- django_cfg/apps/integrations/rq/views/jobs.py +892 -0
- django_cfg/apps/integrations/rq/views/monitoring.py +248 -0
- django_cfg/apps/integrations/rq/views/queues.py +261 -0
- django_cfg/apps/integrations/rq/views/schedule.py +404 -0
- django_cfg/apps/integrations/rq/views/testing.py +761 -0
- django_cfg/apps/integrations/rq/views/workers.py +195 -0
- django_cfg/apps/system/__init__.py +0 -0
- django_cfg/apps/system/dashboard/TRANSACTION_FIX.md +73 -0
- django_cfg/apps/{dashboard → system/dashboard}/__init__.py +1 -1
- django_cfg/apps/{dashboard → system/dashboard}/apps.py +1 -1
- django_cfg/apps/{dashboard → system/dashboard}/serializers/__init__.py +4 -11
- django_cfg/apps/{dashboard → system/dashboard}/serializers/activity.py +1 -1
- django_cfg/apps/{dashboard → system/dashboard}/serializers/commands.py +25 -1
- django_cfg/apps/system/dashboard/serializers/config.py +245 -0
- django_cfg/apps/{dashboard → system/dashboard}/services/__init__.py +2 -2
- django_cfg/apps/{dashboard → system/dashboard}/services/charts_service.py +4 -3
- django_cfg/apps/{dashboard → system/dashboard}/services/commands_service.py +12 -1
- django_cfg/apps/system/dashboard/services/config_service.py +393 -0
- django_cfg/apps/{dashboard → system/dashboard}/services/statistics_service.py +11 -2
- django_cfg/apps/{dashboard → system/dashboard}/services/system_health_service.py +64 -106
- django_cfg/apps/{dashboard → system/dashboard}/urls.py +3 -2
- django_cfg/apps/{dashboard → system/dashboard}/views/__init__.py +2 -2
- django_cfg/apps/{dashboard → system/dashboard}/views/commands_views.py +3 -6
- django_cfg/apps/system/dashboard/views/config_views.py +69 -0
- django_cfg/apps/{dashboard → system/dashboard}/views/overview_views.py +14 -13
- django_cfg/apps/{frontend → system/frontend}/__init__.py +1 -1
- django_cfg/apps/{frontend → system/frontend}/apps.py +1 -1
- django_cfg/apps/{frontend → system/frontend}/setup.py +5 -5
- django_cfg/apps/{frontend → system/frontend}/views.py +18 -3
- django_cfg/apps/system/maintenance/__init__.py +56 -0
- django_cfg/apps/{maintenance → system/maintenance}/admin/api_key_admin.py +10 -12
- django_cfg/apps/{maintenance → system/maintenance}/admin/scheduled_admin.py +3 -3
- django_cfg/apps/{maintenance → system/maintenance}/admin/site_admin.py +10 -9
- django_cfg/apps/{maintenance → system/maintenance}/apps.py +1 -1
- django_cfg/apps/system/maintenance/management/__init__.py +0 -0
- django_cfg/apps/system/maintenance/management/commands/__init__.py +0 -0
- django_cfg/apps/{maintenance → system/maintenance}/management/commands/maintenance.py +5 -2
- django_cfg/apps/{maintenance → system/maintenance}/management/commands/process_scheduled_maintenance.py +4 -2
- django_cfg/apps/{maintenance → system/maintenance}/management/commands/sync_cloudflare.py +5 -2
- django_cfg/apps/system/maintenance/migrations/__init__.py +0 -0
- django_cfg/apps/{maintenance → system/maintenance}/models/__init__.py +4 -4
- django_cfg/apps/system/maintenance/services/__init__.py +42 -0
- django_cfg/apps/urls.py +54 -115
- django_cfg/config.py +36 -0
- django_cfg/core/base/config_model.py +27 -28
- django_cfg/core/builders/apps_builder.py +19 -21
- django_cfg/core/constants.py +1 -0
- django_cfg/core/debug/README.md +116 -0
- django_cfg/core/debug/__init__.py +7 -0
- django_cfg/core/debug/example_config.py +63 -0
- django_cfg/core/debug/warnings_helper.py +121 -0
- django_cfg/core/generation/integration_generators/__init__.py +3 -6
- django_cfg/core/generation/integration_generators/django_rq.py +80 -0
- django_cfg/core/generation/integration_generators/grpc_generator.py +316 -0
- django_cfg/core/generation/orchestrator.py +15 -15
- django_cfg/core/integration/display/__init__.py +2 -0
- django_cfg/core/integration/display/base.py +51 -0
- django_cfg/core/integration/display/grpc_display.py +144 -0
- django_cfg/core/integration/display/startup.py +24 -58
- django_cfg/management/commands/check_endpoints.py +2 -2
- django_cfg/management/commands/check_settings.py +3 -10
- django_cfg/management/commands/clear_constance.py +3 -10
- django_cfg/management/commands/create_token.py +4 -11
- django_cfg/management/commands/list_urls.py +4 -10
- django_cfg/management/commands/migrate_all.py +18 -12
- django_cfg/management/commands/migrator.py +4 -11
- django_cfg/management/commands/script.py +4 -10
- django_cfg/management/commands/show_config.py +8 -16
- django_cfg/management/commands/show_urls.py +5 -11
- django_cfg/management/commands/superuser.py +4 -11
- django_cfg/management/commands/tree.py +5 -10
- django_cfg/management/utils/README.md +402 -0
- django_cfg/management/utils/__init__.py +29 -0
- django_cfg/management/utils/mixins.py +176 -0
- django_cfg/middleware/authentication.py +1 -1
- django_cfg/middleware/pagination.py +53 -54
- django_cfg/mixins/__init__.py +2 -0
- django_cfg/mixins/superadmin_api.py +59 -0
- django_cfg/models/__init__.py +3 -3
- django_cfg/models/api/grpc/__init__.py +53 -0
- django_cfg/models/api/grpc/config.py +446 -0
- django_cfg/models/django/__init__.py +3 -3
- django_cfg/models/django/constance.py +1 -1
- django_cfg/models/django/django_rq.py +632 -0
- django_cfg/models/django/revolution_legacy.py +8 -8
- django_cfg/models/ngrok/config.py +7 -6
- django_cfg/modules/base.py +19 -6
- django_cfg/modules/django_admin/__init__.py +2 -0
- django_cfg/modules/django_admin/apps.py +19 -0
- django_cfg/modules/django_admin/base/pydantic_admin.py +23 -12
- django_cfg/modules/django_admin/config/__init__.py +2 -0
- django_cfg/modules/django_admin/config/admin_config.py +7 -0
- django_cfg/modules/django_admin/config/background_task_config.py +4 -4
- django_cfg/modules/django_admin/config/field_config.py +24 -0
- django_cfg/modules/django_admin/templates/django_admin/widgets/encrypted_field.html +80 -0
- django_cfg/modules/django_admin/templates/django_admin/widgets/encrypted_password.html +62 -0
- django_cfg/modules/django_admin/utils/__init__.py +41 -3
- django_cfg/modules/django_admin/utils/badges/__init__.py +13 -0
- django_cfg/modules/django_admin/utils/{badges.py → badges/status_badges.py} +3 -3
- django_cfg/modules/django_admin/utils/displays/__init__.py +13 -0
- django_cfg/modules/django_admin/utils/{displays.py → displays/data_displays.py} +2 -2
- django_cfg/modules/django_admin/utils/html/__init__.py +26 -0
- django_cfg/modules/django_admin/utils/html/badges.py +55 -0
- django_cfg/modules/django_admin/utils/html/base.py +167 -0
- django_cfg/modules/django_admin/utils/html/code.py +87 -0
- django_cfg/modules/django_admin/utils/html/composition.py +205 -0
- django_cfg/modules/django_admin/utils/html/formatting.py +231 -0
- django_cfg/modules/django_admin/utils/html/keyvalue.py +219 -0
- django_cfg/modules/django_admin/utils/html/markdown_integration.py +108 -0
- django_cfg/modules/django_admin/utils/html/progress.py +127 -0
- django_cfg/modules/django_admin/utils/html_builder.py +55 -408
- django_cfg/modules/django_admin/utils/markdown/__init__.py +21 -0
- django_cfg/modules/django_admin/widgets/__init__.py +3 -0
- django_cfg/modules/django_admin/widgets/encrypted_field_widget.py +66 -0
- django_cfg/modules/django_admin/widgets/registry.py +42 -0
- django_cfg/modules/django_client/core/generator/python/files_generator.py +5 -13
- django_cfg/modules/django_client/core/generator/python/templates/api_wrapper.py.jinja +16 -4
- django_cfg/modules/django_client/core/generator/python/templates/main_init.py.jinja +2 -3
- django_cfg/modules/django_client/core/generator/typescript/files_generator.py +6 -5
- django_cfg/modules/django_client/core/generator/typescript/operations_generator.py +13 -4
- django_cfg/modules/django_client/core/generator/typescript/templates/main_index.ts.jinja +12 -8
- django_cfg/modules/django_client/core/parser/base.py +135 -2
- django_cfg/modules/django_client/management/commands/generate_client.py +5 -2
- django_cfg/modules/django_client/management/commands/validate_openapi.py +5 -2
- django_cfg/modules/django_currency/examples/example_database_usage.py +1 -1
- django_cfg/modules/django_email/management/commands/test_email.py +4 -10
- django_cfg/modules/django_logging/__init__.py +2 -0
- django_cfg/modules/django_logging/django_logger.py +78 -8
- django_cfg/modules/django_ngrok/management/commands/runserver_ngrok.py +16 -13
- django_cfg/modules/django_telegram/management/commands/test_telegram.py +4 -11
- django_cfg/modules/django_twilio/management/commands/test_twilio.py +4 -11
- django_cfg/modules/django_twilio/sendgrid_service.py +1 -1
- django_cfg/modules/django_unfold/navigation.py +15 -24
- django_cfg/modules/nextjs_admin/views.py +1 -1
- django_cfg/pyproject.toml +10 -10
- django_cfg/registry/core.py +4 -7
- django_cfg/registry/modules.py +4 -1
- django_cfg/requirements.txt +52 -0
- django_cfg/static/frontend/admin.zip +0 -0
- django_cfg/templates/admin/constance/includes/results_list.html +73 -0
- django_cfg/templates/admin/index.html +187 -62
- django_cfg/templatetags/django_cfg.py +61 -1
- {django_cfg-1.4.116.dist-info → django_cfg-1.5.14.dist-info}/METADATA +106 -60
- django_cfg-1.5.14.dist-info/RECORD +1182 -0
- django_cfg/apps/centrifugo/apps.py +0 -31
- django_cfg/apps/centrifugo/serializers/publishes.py +0 -18
- django_cfg/apps/dashboard/permissions.py +0 -48
- django_cfg/apps/dashboard/serializers/django_q2.py +0 -50
- django_cfg/apps/dashboard/services/django_q2_service.py +0 -159
- django_cfg/apps/dashboard/views/django_q2_views.py +0 -79
- django_cfg/apps/knowbase/examples/__init__.py +0 -3
- django_cfg/apps/maintenance/__init__.py +0 -56
- django_cfg/apps/maintenance/services/__init__.py +0 -42
- django_cfg/apps/tasks/__init__.py +0 -64
- django_cfg/apps/tasks/admin/__init__.py +0 -4
- django_cfg/apps/tasks/admin/config.py +0 -98
- django_cfg/apps/tasks/admin/task_log.py +0 -265
- django_cfg/apps/tasks/apps.py +0 -15
- django_cfg/apps/tasks/filters/__init__.py +0 -10
- django_cfg/apps/tasks/filters/task_log.py +0 -121
- django_cfg/apps/tasks/migrations/0001_initial.py +0 -196
- django_cfg/apps/tasks/migrations/0002_delete_tasklog.py +0 -16
- django_cfg/apps/tasks/models/__init__.py +0 -4
- django_cfg/apps/tasks/models/task_log.py +0 -246
- django_cfg/apps/tasks/serializers/__init__.py +0 -28
- django_cfg/apps/tasks/serializers/task_log.py +0 -249
- django_cfg/apps/tasks/services/__init__.py +0 -10
- django_cfg/apps/tasks/services/client/__init__.py +0 -7
- django_cfg/apps/tasks/services/client/client.py +0 -234
- django_cfg/apps/tasks/services/config_helper.py +0 -63
- django_cfg/apps/tasks/services/sync.py +0 -204
- django_cfg/apps/tasks/urls.py +0 -16
- django_cfg/apps/tasks/views/__init__.py +0 -10
- django_cfg/apps/tasks/views/task_log.py +0 -41
- django_cfg/apps/tasks/views/task_log_base.py +0 -41
- django_cfg/apps/tasks/views/task_log_overview.py +0 -100
- django_cfg/apps/tasks/views/task_log_related.py +0 -41
- django_cfg/apps/tasks/views/task_log_stats.py +0 -91
- django_cfg/apps/tasks/views/task_log_timeline.py +0 -81
- django_cfg/core/generation/integration_generators/django_q2.py +0 -133
- django_cfg/core/generation/integration_generators/tasks.py +0 -88
- django_cfg/models/django/django_q2.py +0 -496
- django_cfg/models/tasks/__init__.py +0 -49
- django_cfg/models/tasks/backends.py +0 -122
- django_cfg/models/tasks/config.py +0 -209
- django_cfg/models/tasks/utils.py +0 -162
- django_cfg/modules/django_admin/utils/CODE_BLOCK_DOCS.md +0 -396
- django_cfg/modules/django_logging/FIXES_SUMMARY.md +0 -276
- django_cfg/modules/django_logging/LOGGING_GUIDE.md +0 -504
- django_cfg-1.4.116.dist-info/RECORD +0 -1068
- /django_cfg/apps/{accounts/migrations → business}/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/README.md +0 -0
- /django_cfg/apps/{accounts → business/accounts}/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/__models.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/activity_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/filters.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/group_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/otp_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/registration_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/resources.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/admin/twilio_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/managers/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0002_add_phone_otp_clean.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0003_twilioresponse.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0004_delete_twilioresponse.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0005_twilioresponse.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0006_remove_twilioresponse_otp_secret_and_more.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/migrations/0007_twilioresponse.py +0 -0
- /django_cfg/apps/{knowbase/management → business/accounts/migrations}/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/activity.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/auth.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/base.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/choices.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/integrations.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/registration.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/models/user.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/serializers/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/serializers/otp.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/serializers/profile.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/serializers/webhook.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/services/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/services/activity_service.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/services/otp_service.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/signals.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/base_email.html +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/base_email.txt +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/otp_email.html +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/otp_email.txt +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/welcome_email.html +0 -0
- /django_cfg/apps/{accounts → business/accounts}/templates/emails/welcome_email.txt +0 -0
- /django_cfg/apps/{accounts → business/accounts}/urls.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/urls_admin.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/utils/notifications.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/views/__init__.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/views/otp.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/views/profile.py +0 -0
- /django_cfg/apps/{accounts → business/accounts}/views/webhook.py +0 -0
- /django_cfg/apps/{agents → business/agents}/README.md +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/execution_actions.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/execution_admin.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/registry_actions.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/registry_admin.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/toolsets_actions.py +0 -0
- /django_cfg/apps/{agents → business/agents}/admin/toolsets_admin.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/dependencies.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/django_agent.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/exceptions.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/models.py +0 -0
- /django_cfg/apps/{agents → business/agents}/core/orchestrator.py +0 -0
- /django_cfg/apps/{agents → business/agents}/examples/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/examples/simple_example.py +0 -0
- /django_cfg/apps/{agents → business/agents}/integration/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/integration/middleware.py +0 -0
- /django_cfg/apps/{agents → business/agents}/integration/registry.py +0 -0
- /django_cfg/apps/{agents → business/agents}/integration/signals.py +0 -0
- /django_cfg/apps/{agents → business/agents}/management/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/management/commands/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/managers/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/managers/execution.py +0 -0
- /django_cfg/apps/{agents → business/agents}/managers/registry.py +0 -0
- /django_cfg/apps/{agents → business/agents}/managers/toolsets.py +0 -0
- /django_cfg/apps/{agents → business/agents}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{agents → business/agents}/migrations/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/models/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/models/execution.py +0 -0
- /django_cfg/apps/{agents → business/agents}/models/registry.py +0 -0
- /django_cfg/apps/{agents → business/agents}/models/toolsets.py +0 -0
- /django_cfg/apps/{agents → business/agents}/patterns/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/patterns/content_agents.py +0 -0
- /django_cfg/apps/{agents → business/agents}/toolsets/__init__.py +0 -0
- /django_cfg/apps/{agents → business/agents}/toolsets/cache_toolset.py +0 -0
- /django_cfg/apps/{agents → business/agents}/toolsets/django_toolset.py +0 -0
- /django_cfg/apps/{agents → business/agents}/toolsets/file_toolset.py +0 -0
- /django_cfg/apps/{agents → business/agents}/toolsets/orm_toolset.py +0 -0
- /django_cfg/apps/{agents → business/agents}/urls.py +0 -0
- /django_cfg/apps/{agents → business/agents}/urls_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/README.md +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/archive_actions.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/archive_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/chat_actions.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/chat_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/document_actions.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/document_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/external_data_actions.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/admin/external_data_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/config/README.md +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/config/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/config/constance_fields.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/config/constance_settings.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/config/settings.py +0 -0
- /django_cfg/apps/{knowbase/management/commands → business/knowbase/management}/__init__.py +0 -0
- /django_cfg/apps/{leads → business/knowbase/management/commands}/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/archive.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/base.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/chat.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/document.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/managers/external_data.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/migrations/0002_archiveitem_archiveitemchunk_documentarchive_and_more.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/migrations/0003_alter_documentarchive_archive_type.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/migrations/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/config/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/config/defaults.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/config/meta_config.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/config.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/creator.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/external_data_mixin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/generators/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/generators/content_generator.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/generators/field_analyzer.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/mixins/generators/metadata_generator.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/models/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/models/archive.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/models/base.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/models/chat.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/models/document.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/archive_serializers.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/chat_serializers.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/document_serializers.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/external_data_serializers.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/serializers/public_serializers.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/analyzers/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/analyzers/complexity_analyzer.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/analyzers/purpose_detector.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/analyzers/quality_analyzer.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/analyzers/tag_generator.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/archive_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/base.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/json_chunker.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/markdown_chunker.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/python_chunker.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking/text_chunker.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/chunking_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/context/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/context/builders.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/context/models.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/exceptions.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/archive/extraction_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/base.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/chat_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/document_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/embedding/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/embedding/batch_result.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/embedding/models.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/prompt_builder.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/services/search_service.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/signals/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/signals/archive_signals.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/signals/chat_signals.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/signals/document_signals.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/signals/external_data_signals.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/tasks/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/tasks/archive_tasks.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/tasks/external_data_tasks.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/tasks/maintenance.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/urls.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/urls_admin.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/urls_system.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/utils/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/utils/text_processing.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/utils/validation.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/views/__init__.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/views/base.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/views/chat_views.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/views/document_views.py +0 -0
- /django_cfg/apps/{knowbase → business/knowbase}/views/public_views.py +0 -0
- /django_cfg/apps/{leads → business/leads}/README.md +0 -0
- /django_cfg/apps/{leads/migrations → business/leads}/__init__.py +0 -0
- /django_cfg/apps/{leads → business/leads}/admin/__init__.py +0 -0
- /django_cfg/apps/{leads → business/leads}/admin/actions.py +0 -0
- /django_cfg/apps/{leads → business/leads}/admin/leads_admin.py +0 -0
- /django_cfg/apps/{leads → business/leads}/admin/resources.py +0 -0
- /django_cfg/apps/{leads → business/leads}/admin.py +0 -0
- /django_cfg/apps/{leads → business/leads}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{maintenance/management → business/leads/migrations}/__init__.py +0 -0
- /django_cfg/apps/{leads → business/leads}/models.py +0 -0
- /django_cfg/apps/{leads → business/leads}/serializers.py +0 -0
- /django_cfg/apps/{leads → business/leads}/signals.py +0 -0
- /django_cfg/apps/{leads → business/leads}/tests.py +0 -0
- /django_cfg/apps/{leads → business/leads}/urls.py +0 -0
- /django_cfg/apps/{leads → business/leads}/urls_admin.py +0 -0
- /django_cfg/apps/{leads → business/leads}/views.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/README.md +0 -0
- /django_cfg/apps/{maintenance/management/commands → business/newsletter}/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin/actions.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin/filters.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin/resources.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/admin_filters.py +0 -0
- /django_cfg/apps/{maintenance/migrations → business/newsletter/management}/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter/management/commands}/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/managers/README.md +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/managers/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{newsletter/management → business/newsletter/migrations}/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/models.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/serializers.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/services/email_service.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/signals.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/urls.py +0 -0
- /django_cfg/apps/{maintenance → business/newsletter}/urls_admin.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/utils/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/__init__.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/campaigns.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/emails.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/newsletters.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/subscriptions.py +0 -0
- /django_cfg/apps/{newsletter → business/newsletter}/views/tracking.py +0 -0
- /django_cfg/apps/{payments → business/payments}/CONFIGURATION.md +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/actions.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/balance_actions.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/currency_admin.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/filters.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/payment_actions.py +0 -0
- /django_cfg/apps/{payments → business/payments}/admin/withdrawal_actions.py +0 -0
- /django_cfg/apps/{payments → business/payments}/api/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/api/serializers.py +0 -0
- /django_cfg/apps/{payments → business/payments}/api/urls.py +0 -0
- /django_cfg/apps/{payments → business/payments}/api/views.py +0 -0
- /django_cfg/apps/{payments → business/payments}/config.py +0 -0
- /django_cfg/apps/{payments → business/payments}/management/README.md +0 -0
- /django_cfg/apps/{newsletter/management/commands → business/payments/management}/__init__.py +0 -0
- /django_cfg/apps/{newsletter/migrations → business/payments/management/commands}/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{payments/management → business/payments/migrations}/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/balance.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/base.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/currency.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/managers/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/managers/balance_managers.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/managers/payment_managers.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/payment.py +0 -0
- /django_cfg/apps/{payments → business/payments}/models/withdrawal.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/balance_service.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/payment_service.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/models.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/nowpayments/__init__.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/nowpayments/config.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/nowpayments/parser.py +0 -0
- /django_cfg/apps/{payments → business/payments}/services/providers/nowpayments/provider.py +0 -0
- /django_cfg/apps/{payments/management/commands → business/support}/__init__.py +0 -0
- /django_cfg/apps/{support → business/support}/admin/__init__.py +0 -0
- /django_cfg/apps/{support → business/support}/admin/actions.py +0 -0
- /django_cfg/apps/{support → business/support}/admin/filters.py +0 -0
- /django_cfg/apps/{support → business/support}/admin/resources.py +0 -0
- /django_cfg/apps/{support → business/support}/admin/support_admin.py +0 -0
- /django_cfg/apps/{support → business/support}/admin.py +0 -0
- /django_cfg/apps/{support → business/support}/admin_filters.py +0 -0
- /django_cfg/apps/{support → business/support}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{support → business/support}/migrations/0002_alter_message_ticket.py +0 -0
- /django_cfg/apps/{payments → business/support}/migrations/__init__.py +0 -0
- /django_cfg/apps/{support → business/support}/models.py +0 -0
- /django_cfg/apps/{support → business/support}/serializers.py +0 -0
- /django_cfg/apps/{support → business/support}/signals.py +0 -0
- /django_cfg/apps/{support → business/support}/templates/support/chat/access_denied.html +0 -0
- /django_cfg/apps/{support → business/support}/templates/support/chat/ticket_chat.html +0 -0
- /django_cfg/apps/{support → business/support}/urls.py +0 -0
- /django_cfg/apps/{newsletter → business/support}/urls_admin.py +0 -0
- /django_cfg/apps/{support → business/support/utils}/__init__.py +0 -0
- /django_cfg/apps/{support → business/support}/utils/support_email_service.py +0 -0
- /django_cfg/apps/{support → business/support}/views/__init__.py +0 -0
- /django_cfg/apps/{support → business/support}/views/admin.py +0 -0
- /django_cfg/apps/{support → business/support}/views/api.py +0 -0
- /django_cfg/apps/{support → business/support}/views/chat.py +0 -0
- /django_cfg/apps/{support/migrations → integrations}/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/admin/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/admin/config.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/IMPLEMENTATION_SUMMARY.md +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/README.md +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/USAGE.md +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/discovery.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/generator.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/README.md.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/client.go.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/go.mod.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/rpc_client.go.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/rpc_client.go.j2.old +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/go_thin/templates/types.go.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/generator.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/README.md.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/__init__.py.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/client.py.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/models.py.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/requirements.txt.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/python_thin/templates/rpc_client.py.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/generator.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/README.md.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/client.ts.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/index.ts.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/package.json.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/rpc-client.ts.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/tsconfig.json.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/generators/typescript_thin/templates/types.ts.j2 +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/utils/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/utils/naming.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/codegen/utils/type_converter.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/decorators.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/management/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/management/commands/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/managers/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/managers/centrifugo_log.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/migrations/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/models/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/models/centrifugo_log.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/registry.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/router.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/serializers/admin_api.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/serializers/channels.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/serializers/health.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/client/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/client/exceptions.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/config_helper.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/dashboard_notifier.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/services/logging.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/urls.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/views/__init__.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/views/admin_api.py +0 -0
- /django_cfg/apps/{centrifugo → integrations/centrifugo}/views/testing_api.py +0 -0
- /django_cfg/apps/{support/utils → integrations/grpc/management/commands}/__init__.py +0 -0
- /django_cfg/apps/{tasks → integrations/grpc}/migrations/__init__.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/apizones.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/base.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/charts.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/overview.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/statistics.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/serializers/system.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/services/apizones_service.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/services/commands_security.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/services/overview_service.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/views/activity_views.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/views/apizones_views.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/views/charts_views.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/views/statistics_views.py +0 -0
- /django_cfg/apps/{dashboard → system/dashboard}/views/system_views.py +0 -0
- /django_cfg/apps/{frontend → system/frontend}/JWT_AUTO_INJECTION.md +0 -0
- /django_cfg/apps/{frontend → system/frontend}/templates/frontend/404.html +0 -0
- /django_cfg/apps/{frontend → system/frontend}/test_routing.py +0 -0
- /django_cfg/apps/{frontend → system/frontend}/urls.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/admin/__init__.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/admin/actions.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/admin/log_admin.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/managers/__init__.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/managers/cloudflare_site_manager.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/managers/maintenance_log_manager.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/migrations/0001_initial.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/migrations/0002_cloudflaresite_maintenance_url.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/migrations/0003_cloudflaresite_include_subdomains_and_more.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/models/cloudflare_api_key.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/models/cloudflare_site.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/models/maintenance_log.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/models/scheduled_maintenance.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/services/bulk_operations_service.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/services/maintenance_service.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/services/scheduled_maintenance_service.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/services/site_sync_service.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/urls.py +0 -0
- /django_cfg/apps/{support → system/maintenance}/urls_admin.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/utils/__init__.py +0 -0
- /django_cfg/apps/{maintenance → system/maintenance}/utils/retry_utils.py +0 -0
- /django_cfg/modules/django_admin/utils/{mermaid_plugin.py → markdown/mermaid_plugin.py} +0 -0
- /django_cfg/modules/django_admin/utils/{markdown_renderer.py → markdown/renderer.py} +0 -0
- {django_cfg-1.4.116.dist-info → django_cfg-1.5.14.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.116.dist-info → django_cfg-1.5.14.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.116.dist-info → django_cfg-1.5.14.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,419 +1,66 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
3
|
-
"""
|
|
2
|
+
HtmlBuilder - Facade class for backward compatibility.
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import re
|
|
4
|
+
This class provides the old `self.html.*` API by delegating to new modular components.
|
|
5
|
+
All existing admin code using `self.html.badge()`, `self.html.inline()`, etc. will continue to work.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
from
|
|
7
|
+
New code should import and use the specific modules directly:
|
|
8
|
+
from django_cfg.modules.django_admin.utils import BaseElements, FormattingElements, etc.
|
|
9
|
+
"""
|
|
11
10
|
|
|
12
|
-
from
|
|
13
|
-
|
|
11
|
+
from .html import (
|
|
12
|
+
BadgeElements,
|
|
13
|
+
BaseElements,
|
|
14
|
+
CodeElements,
|
|
15
|
+
CompositionElements,
|
|
16
|
+
FormattingElements,
|
|
17
|
+
KeyValueElements,
|
|
18
|
+
MarkdownIntegration,
|
|
19
|
+
ProgressElements,
|
|
20
|
+
)
|
|
14
21
|
|
|
15
22
|
|
|
16
23
|
class HtmlBuilder:
|
|
17
24
|
"""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Usage in admin methods:
|
|
21
|
-
def stats(self, obj):
|
|
22
|
-
return self.html.inline([
|
|
23
|
-
self.html.icon_text(Icons.EDIT, obj.posts_count),
|
|
24
|
-
self.html.icon_text(Icons.CHAT, obj.comments_count),
|
|
25
|
-
])
|
|
25
|
+
Facade class that delegates to modular HTML utilities.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return self.html.markdown_docs(obj.docs_path)
|
|
27
|
+
Provides backward compatibility for `self.html.*` API in admin classes.
|
|
29
28
|
"""
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
html.icon_text(Icons.EDIT, 5) # Icon with number
|
|
69
|
-
html.icon_text("📝", 5) # Emoji with number
|
|
70
|
-
html.icon_text("Active") # Just text
|
|
71
|
-
"""
|
|
72
|
-
if text is None:
|
|
73
|
-
# Just text
|
|
74
|
-
return format_html('<span>{}</span>', escape(str(icon_or_text)))
|
|
75
|
-
|
|
76
|
-
# Check if it's a Material Icon (from Icons class) or emoji
|
|
77
|
-
icon_str = str(icon_or_text)
|
|
78
|
-
|
|
79
|
-
# Detect if it's emoji by checking for non-ASCII characters
|
|
80
|
-
is_emoji = any(ord(c) > 127 for c in icon_str)
|
|
81
|
-
|
|
82
|
-
if is_emoji or icon_str in ['📝', '💬', '🛒', '👤', '📧', '🔔', '⚙️', '🔧', '📊', '🎯']:
|
|
83
|
-
# Emoji
|
|
84
|
-
icon_html = escape(icon_str)
|
|
85
|
-
else:
|
|
86
|
-
# Material Icon
|
|
87
|
-
icon_html = HtmlBuilder.icon(icon_str, size=icon_size)
|
|
88
|
-
|
|
89
|
-
return format_html('{}{}<span>{}</span>', icon_html, separator, escape(str(text)))
|
|
90
|
-
|
|
91
|
-
@staticmethod
|
|
92
|
-
def inline(items: List[Any], separator: str = " | ",
|
|
93
|
-
size: str = "small", css_class: str = "") -> SafeString:
|
|
94
|
-
"""
|
|
95
|
-
Render items inline with separator.
|
|
96
|
-
|
|
97
|
-
Args:
|
|
98
|
-
items: List of SafeString/str items to join
|
|
99
|
-
separator: Separator between items
|
|
100
|
-
size: small, medium, large
|
|
101
|
-
css_class: Additional CSS classes
|
|
102
|
-
|
|
103
|
-
Usage:
|
|
104
|
-
html.inline([
|
|
105
|
-
html.icon_text(Icons.EDIT, 5),
|
|
106
|
-
html.icon_text(Icons.CHAT, 10),
|
|
107
|
-
])
|
|
108
|
-
"""
|
|
109
|
-
if not items:
|
|
110
|
-
return format_html('<span class="text-font-subtle-light dark:text-font-subtle-dark">—</span>')
|
|
111
|
-
|
|
112
|
-
size_classes = {
|
|
113
|
-
'small': 'text-xs',
|
|
114
|
-
'medium': 'text-sm',
|
|
115
|
-
'large': 'text-base'
|
|
116
|
-
}
|
|
117
|
-
size_class = size_classes.get(size, 'text-xs')
|
|
118
|
-
|
|
119
|
-
classes = size_class
|
|
120
|
-
if css_class:
|
|
121
|
-
classes += f" {css_class}"
|
|
122
|
-
|
|
123
|
-
# Convert items to strings, keeping SafeString as-is
|
|
124
|
-
from django.utils.safestring import SafeString, mark_safe
|
|
125
|
-
processed_items = []
|
|
126
|
-
for item in items:
|
|
127
|
-
if isinstance(item, (SafeString, str)):
|
|
128
|
-
processed_items.append(item)
|
|
129
|
-
else:
|
|
130
|
-
processed_items.append(escape(str(item)))
|
|
131
|
-
|
|
132
|
-
# Join with separator
|
|
133
|
-
joined = mark_safe(separator.join(str(item) for item in processed_items))
|
|
134
|
-
|
|
135
|
-
return format_html('<span class="{}">{}</span>', classes, joined)
|
|
136
|
-
|
|
137
|
-
@staticmethod
|
|
138
|
-
def span(text: Any, css_class: str = "") -> SafeString:
|
|
139
|
-
"""
|
|
140
|
-
Render text in span with optional CSS class.
|
|
141
|
-
|
|
142
|
-
Args:
|
|
143
|
-
text: Text to display
|
|
144
|
-
css_class: CSS classes
|
|
145
|
-
"""
|
|
146
|
-
if css_class:
|
|
147
|
-
return format_html('<span class="{}">{}</span>', css_class, escape(str(text)))
|
|
148
|
-
return format_html('<span>{}</span>', escape(str(text)))
|
|
149
|
-
|
|
150
|
-
@staticmethod
|
|
151
|
-
def div(content: Any, css_class: str = "") -> SafeString:
|
|
152
|
-
"""
|
|
153
|
-
Render content in div with optional CSS class.
|
|
154
|
-
|
|
155
|
-
Args:
|
|
156
|
-
content: Content to display (can be SafeString)
|
|
157
|
-
css_class: CSS classes
|
|
158
|
-
"""
|
|
159
|
-
if css_class:
|
|
160
|
-
return format_html('<div class="{}">{}</div>', css_class, content)
|
|
161
|
-
return format_html('<div>{}</div>', content)
|
|
162
|
-
|
|
163
|
-
@staticmethod
|
|
164
|
-
def link(url: str, text: str, css_class: str = "", target: str = "") -> SafeString:
|
|
165
|
-
"""
|
|
166
|
-
Render link.
|
|
167
|
-
|
|
168
|
-
Args:
|
|
169
|
-
url: URL
|
|
170
|
-
text: Link text
|
|
171
|
-
css_class: CSS classes
|
|
172
|
-
target: Target attribute (_blank, _self, etc)
|
|
173
|
-
"""
|
|
174
|
-
if target:
|
|
175
|
-
return format_html(
|
|
176
|
-
'<a href="{}" class="{}" target="{}">{}</a>',
|
|
177
|
-
url, css_class, target, escape(text)
|
|
178
|
-
)
|
|
179
|
-
return format_html('<a href="{}" class="{}">{}</a>', url, css_class, escape(text))
|
|
180
|
-
|
|
181
|
-
@staticmethod
|
|
182
|
-
def badge(text: Any, variant: str = "primary", icon: Optional[str] = None) -> SafeString:
|
|
183
|
-
"""
|
|
184
|
-
Render badge with optional icon.
|
|
185
|
-
|
|
186
|
-
Args:
|
|
187
|
-
text: Badge text
|
|
188
|
-
variant: primary, success, warning, danger, info, secondary
|
|
189
|
-
icon: Optional Material Icon
|
|
190
|
-
|
|
191
|
-
Usage:
|
|
192
|
-
html.badge("Active", variant="success", icon=Icons.CHECK_CIRCLE)
|
|
193
|
-
"""
|
|
194
|
-
variant_classes = {
|
|
195
|
-
'success': 'bg-success-100 text-success-800 dark:bg-success-900 dark:text-success-200',
|
|
196
|
-
'warning': 'bg-warning-100 text-warning-800 dark:bg-warning-900 dark:text-warning-200',
|
|
197
|
-
'danger': 'bg-danger-100 text-danger-800 dark:bg-danger-900 dark:text-danger-200',
|
|
198
|
-
'info': 'bg-info-100 text-info-800 dark:bg-info-900 dark:text-info-200',
|
|
199
|
-
'primary': 'bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-200',
|
|
200
|
-
'secondary': 'bg-base-100 text-font-default-light dark:bg-base-800 dark:text-font-default-dark',
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
css_classes = variant_classes.get(variant, variant_classes['primary'])
|
|
204
|
-
|
|
205
|
-
icon_html = ""
|
|
206
|
-
if icon:
|
|
207
|
-
icon_html = format_html('<span class="material-symbols-outlined text-xs mr-1">{}</span>', icon)
|
|
208
|
-
|
|
209
|
-
return format_html(
|
|
210
|
-
'<span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium {}">{}{}</span>',
|
|
211
|
-
css_classes, icon_html, escape(str(text))
|
|
212
|
-
)
|
|
213
|
-
|
|
214
|
-
@staticmethod
|
|
215
|
-
def empty(text: str = "—") -> SafeString:
|
|
216
|
-
"""Render empty/placeholder value."""
|
|
217
|
-
return format_html(
|
|
218
|
-
'<span class="text-font-subtle-light dark:text-font-subtle-dark">{}</span>',
|
|
219
|
-
escape(text)
|
|
220
|
-
)
|
|
221
|
-
|
|
222
|
-
@staticmethod
|
|
223
|
-
def code(text: Any, css_class: str = "") -> SafeString:
|
|
224
|
-
"""
|
|
225
|
-
Render inline code.
|
|
226
|
-
|
|
227
|
-
Args:
|
|
228
|
-
text: Code text
|
|
229
|
-
css_class: Additional CSS classes
|
|
230
|
-
|
|
231
|
-
Usage:
|
|
232
|
-
html.code("/path/to/file")
|
|
233
|
-
html.code("command --arg value")
|
|
234
|
-
"""
|
|
235
|
-
base_classes = "font-mono text-xs bg-base-100 dark:bg-base-800 px-1.5 py-0.5 rounded"
|
|
236
|
-
classes = f"{base_classes} {css_class}".strip()
|
|
237
|
-
|
|
238
|
-
return format_html(
|
|
239
|
-
'<code class="{}">{}</code>',
|
|
240
|
-
classes,
|
|
241
|
-
escape(str(text))
|
|
242
|
-
)
|
|
243
|
-
|
|
244
|
-
@staticmethod
|
|
245
|
-
def code_block(
|
|
246
|
-
text: Any,
|
|
247
|
-
language: Optional[str] = None,
|
|
248
|
-
max_height: Optional[str] = None,
|
|
249
|
-
variant: str = "default"
|
|
250
|
-
) -> SafeString:
|
|
251
|
-
"""
|
|
252
|
-
Render code block with optional syntax highlighting and scrolling.
|
|
253
|
-
|
|
254
|
-
Args:
|
|
255
|
-
text: Code content
|
|
256
|
-
language: Programming language (json, python, bash, etc.) - for future syntax highlighting
|
|
257
|
-
max_height: Max height with scrolling (e.g., "400px", "20rem")
|
|
258
|
-
variant: Color variant - default, warning, danger, success, info
|
|
259
|
-
|
|
260
|
-
Usage:
|
|
261
|
-
html.code_block(json.dumps(data, indent=2), language="json")
|
|
262
|
-
html.code_block(stdout, max_height="400px")
|
|
263
|
-
html.code_block(stderr, max_height="400px", variant="warning")
|
|
264
|
-
"""
|
|
265
|
-
# Variant-specific styles
|
|
266
|
-
variant_classes = {
|
|
267
|
-
'default': 'bg-base-50 dark:bg-base-900 border-base-200 dark:border-base-700',
|
|
268
|
-
'warning': 'bg-warning-50 dark:bg-warning-900/20 border-warning-200 dark:border-warning-700',
|
|
269
|
-
'danger': 'bg-danger-50 dark:bg-danger-900/20 border-danger-200 dark:border-danger-700',
|
|
270
|
-
'success': 'bg-success-50 dark:bg-success-900/20 border-success-200 dark:border-success-700',
|
|
271
|
-
'info': 'bg-info-50 dark:bg-info-900/20 border-info-200 dark:border-info-700',
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
variant_class = variant_classes.get(variant, variant_classes['default'])
|
|
275
|
-
|
|
276
|
-
# Base styles
|
|
277
|
-
base_classes = f"font-mono text-xs whitespace-pre-wrap break-words border rounded-md p-3 {variant_class}"
|
|
278
|
-
|
|
279
|
-
# Add max-height and overflow if specified
|
|
280
|
-
style = ""
|
|
281
|
-
if max_height:
|
|
282
|
-
style = f'style="max-height: {max_height}; overflow-y: auto;"'
|
|
283
|
-
|
|
284
|
-
# Add language class for potential syntax highlighting
|
|
285
|
-
lang_class = f"language-{language}" if language else ""
|
|
286
|
-
|
|
287
|
-
return format_html(
|
|
288
|
-
'<pre class="{} {}" {}><code>{}</code></pre>',
|
|
289
|
-
base_classes,
|
|
290
|
-
lang_class,
|
|
291
|
-
style,
|
|
292
|
-
escape(str(text))
|
|
293
|
-
)
|
|
294
|
-
|
|
295
|
-
@staticmethod
|
|
296
|
-
def markdown(
|
|
297
|
-
text: str,
|
|
298
|
-
css_class: str = "",
|
|
299
|
-
max_height: Optional[str] = None,
|
|
300
|
-
enable_plugins: bool = True
|
|
301
|
-
) -> SafeString:
|
|
302
|
-
"""
|
|
303
|
-
Render markdown text to beautifully styled HTML.
|
|
304
|
-
|
|
305
|
-
Delegates to MarkdownRenderer.render_markdown() for actual rendering.
|
|
306
|
-
|
|
307
|
-
Args:
|
|
308
|
-
text: Markdown content
|
|
309
|
-
css_class: Additional CSS classes
|
|
310
|
-
max_height: Max height with scrolling (e.g., "400px", "20rem")
|
|
311
|
-
enable_plugins: Enable mistune plugins (tables, strikethrough, etc.)
|
|
312
|
-
|
|
313
|
-
Usage:
|
|
314
|
-
# Simple markdown rendering
|
|
315
|
-
html.markdown("# Hello\\n\\nThis is **bold** text")
|
|
316
|
-
|
|
317
|
-
# With custom styling
|
|
318
|
-
html.markdown(obj.description, css_class="my-custom-class")
|
|
319
|
-
|
|
320
|
-
# With max height for long content
|
|
321
|
-
html.markdown(obj.documentation, max_height="500px")
|
|
322
|
-
|
|
323
|
-
Returns:
|
|
324
|
-
SafeString with rendered HTML
|
|
325
|
-
"""
|
|
326
|
-
return MarkdownRenderer.render_markdown(
|
|
327
|
-
text=text,
|
|
328
|
-
css_class=css_class,
|
|
329
|
-
max_height=max_height,
|
|
330
|
-
enable_plugins=enable_plugins
|
|
331
|
-
)
|
|
332
|
-
|
|
333
|
-
@staticmethod
|
|
334
|
-
def uuid_short(uuid_value: Any, length: int = 6, show_tooltip: bool = True) -> SafeString:
|
|
335
|
-
"""
|
|
336
|
-
Shorten UUID to first N characters with optional tooltip.
|
|
337
|
-
|
|
338
|
-
Args:
|
|
339
|
-
uuid_value: UUID string or UUID object
|
|
340
|
-
length: Number of characters to show (default: 6)
|
|
341
|
-
show_tooltip: Show full UUID on hover (default: True)
|
|
342
|
-
|
|
343
|
-
Usage:
|
|
344
|
-
html.uuid_short(obj.id) # "a1b2c3..."
|
|
345
|
-
html.uuid_short(obj.id, length=8) # "a1b2c3d4..."
|
|
346
|
-
html.uuid_short(obj.id, show_tooltip=False) # Just short version
|
|
347
|
-
|
|
348
|
-
Returns:
|
|
349
|
-
SafeString with shortened UUID
|
|
350
|
-
"""
|
|
351
|
-
uuid_str = str(uuid_value)
|
|
352
|
-
|
|
353
|
-
# Remove dashes for cleaner display
|
|
354
|
-
uuid_clean = uuid_str.replace('-', '')
|
|
355
|
-
|
|
356
|
-
# Take first N characters
|
|
357
|
-
short_uuid = uuid_clean[:length]
|
|
358
|
-
|
|
359
|
-
if show_tooltip:
|
|
360
|
-
return format_html(
|
|
361
|
-
'<code class="font-mono text-xs bg-base-100 dark:bg-base-800 px-1.5 py-0.5 rounded cursor-help" title="{}">{}</code>',
|
|
362
|
-
uuid_str,
|
|
363
|
-
short_uuid
|
|
364
|
-
)
|
|
365
|
-
|
|
366
|
-
return format_html(
|
|
367
|
-
'<code class="font-mono text-xs bg-base-100 dark:bg-base-800 px-1.5 py-0.5 rounded">{}</code>',
|
|
368
|
-
short_uuid
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
@staticmethod
|
|
372
|
-
def markdown_docs(
|
|
373
|
-
content: Union[str, Path],
|
|
374
|
-
collapsible: bool = True,
|
|
375
|
-
title: str = "Documentation",
|
|
376
|
-
icon: str = "description",
|
|
377
|
-
max_height: Optional[str] = "500px",
|
|
378
|
-
enable_plugins: bool = True,
|
|
379
|
-
default_open: bool = False
|
|
380
|
-
) -> SafeString:
|
|
381
|
-
"""
|
|
382
|
-
Render markdown documentation from string or file with collapsible UI.
|
|
383
|
-
|
|
384
|
-
Auto-detects whether content is a file path or markdown string.
|
|
385
|
-
|
|
386
|
-
Args:
|
|
387
|
-
content: Markdown string or path to .md file
|
|
388
|
-
collapsible: Wrap in collapsible details/summary
|
|
389
|
-
title: Title for collapsible section
|
|
390
|
-
icon: Material icon name for title
|
|
391
|
-
max_height: Max height for scrolling
|
|
392
|
-
enable_plugins: Enable markdown plugins
|
|
393
|
-
default_open: Open by default if collapsible
|
|
394
|
-
|
|
395
|
-
Usage:
|
|
396
|
-
# From string with collapse
|
|
397
|
-
html.markdown_docs(obj.description, title="Description")
|
|
398
|
-
|
|
399
|
-
# From file
|
|
400
|
-
html.markdown_docs("docs/api.md", title="API Documentation")
|
|
401
|
-
|
|
402
|
-
# Simple, no collapse
|
|
403
|
-
html.markdown_docs(obj.notes, collapsible=False)
|
|
404
|
-
|
|
405
|
-
# Open by default
|
|
406
|
-
html.markdown_docs(obj.readme, default_open=True)
|
|
407
|
-
|
|
408
|
-
Returns:
|
|
409
|
-
Rendered markdown with beautiful Tailwind styling
|
|
410
|
-
"""
|
|
411
|
-
return MarkdownRenderer.render(
|
|
412
|
-
content=content,
|
|
413
|
-
collapsible=collapsible,
|
|
414
|
-
title=title,
|
|
415
|
-
icon=icon,
|
|
416
|
-
max_height=max_height,
|
|
417
|
-
enable_plugins=enable_plugins,
|
|
418
|
-
default_open=default_open
|
|
419
|
-
)
|
|
30
|
+
# === BaseElements ===
|
|
31
|
+
icon = staticmethod(BaseElements.icon)
|
|
32
|
+
span = staticmethod(BaseElements.span)
|
|
33
|
+
text = staticmethod(BaseElements.text)
|
|
34
|
+
div = staticmethod(BaseElements.div)
|
|
35
|
+
link = staticmethod(BaseElements.link)
|
|
36
|
+
empty = staticmethod(BaseElements.empty)
|
|
37
|
+
|
|
38
|
+
# === CodeElements ===
|
|
39
|
+
code = staticmethod(CodeElements.code)
|
|
40
|
+
code_block = staticmethod(CodeElements.code_block)
|
|
41
|
+
|
|
42
|
+
# === BadgeElements ===
|
|
43
|
+
badge = staticmethod(BadgeElements.badge)
|
|
44
|
+
|
|
45
|
+
# === CompositionElements ===
|
|
46
|
+
inline = staticmethod(CompositionElements.inline)
|
|
47
|
+
icon_text = staticmethod(CompositionElements.icon_text)
|
|
48
|
+
header = staticmethod(CompositionElements.header)
|
|
49
|
+
|
|
50
|
+
# === FormattingElements ===
|
|
51
|
+
number = staticmethod(FormattingElements.number)
|
|
52
|
+
uuid_short = staticmethod(FormattingElements.uuid_short)
|
|
53
|
+
|
|
54
|
+
# === KeyValueElements ===
|
|
55
|
+
key_value = staticmethod(KeyValueElements.key_value)
|
|
56
|
+
breakdown = staticmethod(KeyValueElements.breakdown)
|
|
57
|
+
divider = staticmethod(KeyValueElements.divider)
|
|
58
|
+
key_value_list = staticmethod(KeyValueElements.key_value_list)
|
|
59
|
+
|
|
60
|
+
# === ProgressElements ===
|
|
61
|
+
segment = staticmethod(ProgressElements.segment)
|
|
62
|
+
progress_bar = staticmethod(ProgressElements.progress_bar)
|
|
63
|
+
|
|
64
|
+
# === MarkdownIntegration ===
|
|
65
|
+
markdown = staticmethod(MarkdownIntegration.markdown)
|
|
66
|
+
markdown_docs = staticmethod(MarkdownIntegration.markdown_docs)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Markdown rendering utilities for Django Admin.
|
|
3
|
+
|
|
4
|
+
Provides MarkdownRenderer and mermaid plugin support.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .mermaid_plugin import (
|
|
8
|
+
get_mermaid_resources,
|
|
9
|
+
get_mermaid_script,
|
|
10
|
+
get_mermaid_styles,
|
|
11
|
+
mermaid_plugin,
|
|
12
|
+
)
|
|
13
|
+
from .renderer import MarkdownRenderer
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"MarkdownRenderer",
|
|
17
|
+
"mermaid_plugin",
|
|
18
|
+
"get_mermaid_styles",
|
|
19
|
+
"get_mermaid_script",
|
|
20
|
+
"get_mermaid_resources",
|
|
21
|
+
]
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Widget system for Django Admin.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
from .encrypted_field_widget import EncryptedFieldWidget, EncryptedPasswordWidget
|
|
5
6
|
from .registry import WidgetRegistry
|
|
6
7
|
|
|
7
8
|
__all__ = [
|
|
8
9
|
"WidgetRegistry",
|
|
10
|
+
"EncryptedFieldWidget",
|
|
11
|
+
"EncryptedPasswordWidget",
|
|
9
12
|
]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Custom widget for encrypted fields with copy button.
|
|
3
|
+
"""
|
|
4
|
+
from typing import Any, Optional
|
|
5
|
+
|
|
6
|
+
from unfold.widgets import UnfoldAdminPasswordInput, UnfoldAdminTextInputWidget
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EncryptedFieldWidget(UnfoldAdminTextInputWidget):
|
|
10
|
+
"""
|
|
11
|
+
Text input widget for encrypted fields with copy-to-clipboard button.
|
|
12
|
+
|
|
13
|
+
Extends UnfoldAdminTextInputWidget to add a copy button on the right side.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
template_name = "django_admin/widgets/encrypted_field.html"
|
|
17
|
+
|
|
18
|
+
def __init__(self, attrs: Optional[dict[str, Any]] = None, show_copy_button: bool = True) -> None:
|
|
19
|
+
"""
|
|
20
|
+
Initialize the widget.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
attrs: Widget attributes
|
|
24
|
+
show_copy_button: Whether to show the copy button (default: True)
|
|
25
|
+
"""
|
|
26
|
+
self.show_copy_button = show_copy_button
|
|
27
|
+
super().__init__(attrs=attrs)
|
|
28
|
+
|
|
29
|
+
def get_context(self, name, value, attrs):
|
|
30
|
+
"""Add copy button context."""
|
|
31
|
+
context = super().get_context(name, value, attrs)
|
|
32
|
+
context['widget']['show_copy_button'] = self.show_copy_button
|
|
33
|
+
return context
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class EncryptedPasswordWidget(UnfoldAdminPasswordInput):
|
|
37
|
+
"""
|
|
38
|
+
Password input widget for encrypted fields with copy button.
|
|
39
|
+
|
|
40
|
+
Extends UnfoldAdminPasswordInput to add a copy button on the right side.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
template_name = "django_admin/widgets/encrypted_password.html"
|
|
44
|
+
|
|
45
|
+
def __init__(
|
|
46
|
+
self,
|
|
47
|
+
attrs: Optional[dict[str, Any]] = None,
|
|
48
|
+
render_value: bool = False,
|
|
49
|
+
show_copy_button: bool = True
|
|
50
|
+
) -> None:
|
|
51
|
+
"""
|
|
52
|
+
Initialize the widget.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
attrs: Widget attributes
|
|
56
|
+
render_value: Whether to render the value (default: False)
|
|
57
|
+
show_copy_button: Whether to show the copy button (default: True)
|
|
58
|
+
"""
|
|
59
|
+
self.show_copy_button = show_copy_button
|
|
60
|
+
super().__init__(attrs=attrs, render_value=render_value)
|
|
61
|
+
|
|
62
|
+
def get_context(self, name, value, attrs):
|
|
63
|
+
"""Add copy button context."""
|
|
64
|
+
context = super().get_context(name, value, attrs)
|
|
65
|
+
context['widget']['show_copy_button'] = self.show_copy_button
|
|
66
|
+
return context
|
|
@@ -208,3 +208,45 @@ def _render_image(obj: Any, field: str, config: Dict[str, Any]) -> str:
|
|
|
208
208
|
|
|
209
209
|
# Image widget
|
|
210
210
|
WidgetRegistry.register("image", _render_image)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def _render_short_uuid(obj: Any, field: str, config: Dict[str, Any]) -> str:
|
|
214
|
+
"""Render a shortened UUID with tooltip."""
|
|
215
|
+
from django.utils.safestring import mark_safe
|
|
216
|
+
|
|
217
|
+
# Get UUID value
|
|
218
|
+
uuid_value = getattr(obj, field, None)
|
|
219
|
+
|
|
220
|
+
if not uuid_value:
|
|
221
|
+
return config.get('empty_value', "—")
|
|
222
|
+
|
|
223
|
+
# Convert to string and remove dashes
|
|
224
|
+
uuid_str = str(uuid_value).replace('-', '')
|
|
225
|
+
|
|
226
|
+
# Get configuration
|
|
227
|
+
length = config.get('length', 8)
|
|
228
|
+
show_full_on_hover = config.get('show_full_on_hover', True)
|
|
229
|
+
copy_on_click = config.get('copy_on_click', True)
|
|
230
|
+
|
|
231
|
+
# Truncate to specified length
|
|
232
|
+
short_uuid = uuid_str[:length]
|
|
233
|
+
|
|
234
|
+
# Build HTML
|
|
235
|
+
if show_full_on_hover:
|
|
236
|
+
title_attr = f' title="{uuid_value}"'
|
|
237
|
+
else:
|
|
238
|
+
title_attr = ''
|
|
239
|
+
|
|
240
|
+
if copy_on_click:
|
|
241
|
+
# Add click-to-copy functionality
|
|
242
|
+
copy_attr = f' onclick="navigator.clipboard.writeText(\'{uuid_value}\'); this.style.backgroundColor=\'#e8f5e9\'; setTimeout(() => this.style.backgroundColor=\'\', 500);" style="cursor: pointer;"'
|
|
243
|
+
else:
|
|
244
|
+
copy_attr = ''
|
|
245
|
+
|
|
246
|
+
html = f'<code{title_attr}{copy_attr}>{short_uuid}</code>'
|
|
247
|
+
|
|
248
|
+
return mark_safe(html)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
# ShortUUID widget
|
|
252
|
+
WidgetRegistry.register("short_uuid", _render_short_uuid)
|
|
@@ -161,20 +161,12 @@ class FilesGenerator:
|
|
|
161
161
|
)
|
|
162
162
|
|
|
163
163
|
def generate_schema_file(self, openapi_schema: dict) -> GeneratedFile:
|
|
164
|
-
"""Generate schema.
|
|
165
|
-
#
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
# Convert JSON literals to Python literals
|
|
169
|
-
schema_json = re.sub(r'\btrue\b', 'True', schema_json)
|
|
170
|
-
schema_json = re.sub(r'\bfalse\b', 'False', schema_json)
|
|
171
|
-
schema_json = re.sub(r'\bnull\b', 'None', schema_json)
|
|
172
|
-
|
|
173
|
-
template = self.jinja_env.get_template('utils/schema.py.jinja')
|
|
174
|
-
content = template.render(schema_dict=schema_json)
|
|
164
|
+
"""Generate schema.json with OpenAPI schema."""
|
|
165
|
+
# Generate JSON file with proper formatting
|
|
166
|
+
content = json.dumps(openapi_schema, indent=4, ensure_ascii=False)
|
|
175
167
|
|
|
176
168
|
return GeneratedFile(
|
|
177
|
-
path="schema.
|
|
169
|
+
path="schema.json",
|
|
178
170
|
content=content,
|
|
179
|
-
description="OpenAPI Schema",
|
|
171
|
+
description="OpenAPI Schema (JSON format)",
|
|
180
172
|
)
|
|
@@ -127,14 +127,26 @@ class API:
|
|
|
127
127
|
"""Get current base URL."""
|
|
128
128
|
return self.base_url
|
|
129
129
|
|
|
130
|
-
def
|
|
130
|
+
def get_schema_path(self) -> str:
|
|
131
131
|
"""
|
|
132
|
-
Get OpenAPI schema.
|
|
132
|
+
Get OpenAPI schema path.
|
|
133
133
|
|
|
134
134
|
Returns:
|
|
135
|
-
|
|
135
|
+
Path to the OpenAPI schema JSON file
|
|
136
|
+
|
|
137
|
+
Note:
|
|
138
|
+
The OpenAPI schema is available in the schema.json file.
|
|
139
|
+
You can load it dynamically using:
|
|
140
|
+
```python
|
|
141
|
+
import json
|
|
142
|
+
from pathlib import Path
|
|
143
|
+
|
|
144
|
+
schema_path = Path(__file__).parent / 'schema.json'
|
|
145
|
+
with open(schema_path) as f:
|
|
146
|
+
schema = json.load(f)
|
|
147
|
+
```
|
|
136
148
|
"""
|
|
137
|
-
return
|
|
149
|
+
return './schema.json'
|
|
138
150
|
|
|
139
151
|
async def __aenter__(self) -> 'API':
|
|
140
152
|
"""Async context manager entry."""
|