django-pfx 1.7.6.dev47__tar.gz → 1.7.6.dev49__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/.gitignore +4 -0
  2. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/PKG-INFO +1 -1
  3. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/PKG-INFO +1 -1
  4. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/SOURCES.txt +1 -0
  5. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/scm_file_list.json +1 -0
  6. django_pfx-1.7.6.dev49/django_pfx.egg-info/scm_version.json +8 -0
  7. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/fields/media_field.py +5 -2
  8. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/media_rest_view_mixin.py +2 -2
  9. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/locale/fr/LC_MESSAGES/django.po +3 -3
  10. django_pfx-1.7.6.dev49/tests/migrations/0002_remove_book_local_file.py +18 -0
  11. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/models.py +0 -4
  12. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/basic_api_test.py +2 -300
  13. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_media_local.py +135 -2
  14. django_pfx-1.7.6.dev49/tests/tests/test_fields_media_s3.py +334 -0
  15. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/views.py +1 -1
  16. django_pfx-1.7.6.dev47/django_pfx.egg-info/scm_version.json +0 -8
  17. django_pfx-1.7.6.dev47/tests/tests/test_fields_media_s3.py +0 -76
  18. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/.gitlab-ci.yml +0 -0
  19. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/.pre-commit-config.yaml +0 -0
  20. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/LICENSE +0 -0
  21. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/MANIFEST.in +0 -0
  22. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/README.md +0 -0
  23. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/dependency_links.txt +0 -0
  24. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/requires.txt +0 -0
  25. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/django_pfx.egg-info/top_level.txt +0 -0
  26. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/Makefile +0 -0
  27. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/conf.py +0 -0
  28. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/index.rst +0 -0
  29. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/api.views.rst +0 -0
  30. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/authentication.md +0 -0
  31. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/decorator.md +0 -0
  32. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/generate_openapi.md +0 -0
  33. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/getting_started.md +0 -0
  34. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/internationalisation.md +0 -0
  35. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/model.md +0 -0
  36. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/pfx_views.md +0 -0
  37. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/profiling.md +0 -0
  38. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/settings.md +0 -0
  39. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/testing.md +0 -0
  40. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/doc/source/user_jobs.md +0 -0
  41. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/img/pfx.png +0 -0
  42. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/img/pfx.svg +0 -0
  43. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/make_messages +0 -0
  44. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/manage.py +0 -0
  45. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/__init__.py +0 -0
  46. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/__init__.py +0 -0
  47. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/apps.py +0 -0
  48. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/email_backend/__init__.py +0 -0
  49. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/email_backend/memory_email_backend.py +0 -0
  50. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/email_backend/q_mailjet_email_backend.py +0 -0
  51. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/exceptions.py +0 -0
  52. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/locale/fr/LC_MESSAGES/django.mo +0 -0
  53. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/locale/fr/LC_MESSAGES/django.po +0 -0
  54. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/mailjet/__init__.py +0 -0
  55. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/mailjet/mailjet.py +0 -0
  56. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/mailjet/message_result.py +0 -0
  57. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0001_initial.py +0 -0
  58. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0002_alter_email_headers.py +0 -0
  59. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0003_alter_email_options.py +0 -0
  60. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0004_alter_email_mail_from.py +0 -0
  61. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0005_lowercase_verbose_names.py +0 -0
  62. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/0006_alter_email_attachments.py +0 -0
  63. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/migrations/__init__.py +0 -0
  64. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/models/__init__.py +0 -0
  65. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/models/email.py +0 -0
  66. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/providers/__init__.py +0 -0
  67. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/providers/email_django_q_executor.py +0 -0
  68. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/shortcuts.py +0 -0
  69. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/tasks.py +0 -0
  70. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/templates/emails/base_template.html +0 -0
  71. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/templates/emails/base_template.txt +0 -0
  72. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/templates/emails/base_template_subject.txt +0 -0
  73. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/test.py +0 -0
  74. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/urls.py +0 -0
  75. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/views/__init__.py +0 -0
  76. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/emails/views/email_rest_view.py +0 -0
  77. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/__init__.py +0 -0
  78. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/apidoc/__init__.py +0 -0
  79. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/apidoc/parameters.py +0 -0
  80. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/apidoc/schema.py +0 -0
  81. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/apidoc/tags.py +0 -0
  82. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/apps.py +0 -0
  83. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/decorator/__init__.py +0 -0
  84. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/decorator/rest.py +0 -0
  85. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/default_settings.py +0 -0
  86. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/exceptions.py +0 -0
  87. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/fields/__init__.py +0 -0
  88. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/fields/decimal_field.py +0 -0
  89. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/fields/minutes_duration_field.py +0 -0
  90. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/fields/rich_text_field.py +0 -0
  91. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/http/__init__.py +0 -0
  92. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/http/json_response.py +0 -0
  93. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo +0 -0
  94. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.po +0 -0
  95. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/management/__init__.py +0 -0
  96. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/management/commands/__init__.py +0 -0
  97. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/management/commands/makeapidoc.py +0 -0
  98. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/management/commands/profile.py +0 -0
  99. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/__init__.py +0 -0
  100. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/authenticator.py +0 -0
  101. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/base.py +0 -0
  102. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/email.py +0 -0
  103. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/legacy.py +0 -0
  104. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/mfa/sms.py +0 -0
  105. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/__init__.py +0 -0
  106. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/authentication.py +0 -0
  107. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/locale.py +0 -0
  108. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/profiling.py +0 -0
  109. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/request_too_big_middleware.py +0 -0
  110. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/middleware/ws_cookie_authentication_middleware.py +0 -0
  111. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0001_initial.py +0 -0
  112. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0002_pfxpermissionsuser.py +0 -0
  113. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0003_delete_pfxpermissionsuser.py +0 -0
  114. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0004_alter_loginban_failed_counter_and_more.py +0 -0
  115. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0005_mfadevice_mfadevice_mfa_device_unique_backend.py +0 -0
  116. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0006_alter_pfxuser_managers.py +0 -0
  117. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0007_alter_pfxuser_options.py +0 -0
  118. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/0008_lowercase_verbose_names.py +0 -0
  119. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/__init__.py +0 -0
  120. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/operations/__init__.py +0 -0
  121. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/migrations/operations/permissions.py +0 -0
  122. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/__init__.py +0 -0
  123. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/abstract_pfx_base_user.py +0 -0
  124. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/attachment_mixin.py +0 -0
  125. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/cache_mixins.py +0 -0
  126. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/login_ban.py +0 -0
  127. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/mfa_device.py +0 -0
  128. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/mfa_user_mixin.py +0 -0
  129. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/not_null_fields.py +0 -0
  130. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/ordered_model_mixin.py +0 -0
  131. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/pfx_models.py +0 -0
  132. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/pfx_user.py +0 -0
  133. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/models/user_filtered_queryset_mixin.py +0 -0
  134. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/serializers/__init__.py +0 -0
  135. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/serializers/json.py +0 -0
  136. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/settings.py +0 -0
  137. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/shortcuts.py +0 -0
  138. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/sms/__init__.py +0 -0
  139. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/sms/backends/__init__.py +0 -0
  140. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/sms/backends/base.py +0 -0
  141. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/sms/backends/console.py +0 -0
  142. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/sms/backends/memory.py +0 -0
  143. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/storage/__init__.py +0 -0
  144. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/storage/exceptions.py +0 -0
  145. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/storage/local_storage.py +0 -0
  146. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/storage/s3_storage.py +0 -0
  147. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/otp_code_email.txt +0 -0
  148. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/otp_code_subject.txt +0 -0
  149. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/password_reset_email.txt +0 -0
  150. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/password_reset_subject.txt +0 -0
  151. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/welcome_email.txt +0 -0
  152. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/templates/registration/welcome_subject.txt +0 -0
  153. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/test.py +0 -0
  154. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/urls.py +0 -0
  155. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/version_check.py +0 -0
  156. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/__init__.py +0 -0
  157. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/authentication_views.py +0 -0
  158. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/fields.py +0 -0
  159. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/filters_views.py +0 -0
  160. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/locale_views.py +0 -0
  161. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/mfa_authentication_views.py +0 -0
  162. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/ordered_rest_view_mixin.py +0 -0
  163. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/__init__.py +0 -0
  164. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/date_format.py +0 -0
  165. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/groups.py +0 -0
  166. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/list_count.py +0 -0
  167. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/list_items.py +0 -0
  168. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/list_mode.py +0 -0
  169. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/list_order.py +0 -0
  170. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/list_search.py +0 -0
  171. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/media_redirect.py +0 -0
  172. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/meta_fields.py +0 -0
  173. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/meta_filters.py +0 -0
  174. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/meta_orders.py +0 -0
  175. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset.py +0 -0
  176. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset_limit.py +0 -0
  177. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset_offset.py +0 -0
  178. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset_page.py +0 -0
  179. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset_page_size.py +0 -0
  180. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/parameters/subset_page_subset.py +0 -0
  181. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/views/rest_views.py +0 -0
  182. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/pfxcore/xml_test_runner.py +0 -0
  183. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/settings/__init__.py +0 -0
  184. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/settings/dev.py +0 -0
  185. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/__init__.py +0 -0
  186. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/apps.py +0 -0
  187. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/locale/fr/LC_MESSAGES/django.mo +0 -0
  188. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/locale/fr/LC_MESSAGES/django.po +0 -0
  189. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0001_initial.py +0 -0
  190. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0002_alter_userjob_options_alter_userjob_auto_queued_and_more.py +0 -0
  191. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0003_clean_scheduled_tasks.py +0 -0
  192. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0004_userjob_summary_url.py +0 -0
  193. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0005_swappable_user_job.py +0 -0
  194. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/0006_lowercase_verbose_names.py +0 -0
  195. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/migrations/__init__.py +0 -0
  196. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/models/__init__.py +0 -0
  197. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/models/user_job.py +0 -0
  198. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/models/user_job_attachment.py +0 -0
  199. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/providers/__init__.py +0 -0
  200. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/providers/user_job_django_q_executor.py +0 -0
  201. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/providers/user_job_websocket_channel_provider.py +0 -0
  202. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/tasks.py +0 -0
  203. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/urls.py +0 -0
  204. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/views/__init__.py +0 -0
  205. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/views/user_job_attachment_view.py +0 -0
  206. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/views/user_job_view.py +0 -0
  207. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pfx/userjobs/views/user_websocket_consumer.py +0 -0
  208. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/pyproject.toml +0 -0
  209. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/requirements.txt +0 -0
  210. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/serve-doc +0 -0
  211. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/setup.cfg +0 -0
  212. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/setup.py +0 -0
  213. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/__init__.py +0 -0
  214. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/apps.py +0 -0
  215. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/channel_group_send_calls.py +0 -0
  216. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/mfa_urls.py +0 -0
  217. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/migrations/0001_initial.py +0 -0
  218. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/migrations/__init__.py +0 -0
  219. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/__init__.py +0 -0
  220. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/ci.py +0 -0
  221. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/common.py +0 -0
  222. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/dev.py +0 -0
  223. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/dev_custom_example.py +0 -0
  224. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/settings/dev_default.py +0 -0
  225. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/__init__.py +0 -0
  226. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/basic_api_errors.py +0 -0
  227. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/mfa_test_utils.py +0 -0
  228. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/parallel_scenarios.py +0 -0
  229. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_api_doc.py +0 -0
  230. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_api_doc_search.py +0 -0
  231. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_auth_api.py +0 -0
  232. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_body_mixin.py +0 -0
  233. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_cache.py +0 -0
  234. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_client.py +0 -0
  235. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_emails_email_api.py +0 -0
  236. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_emails_email_model.py +0 -0
  237. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_emails_q_mailjet_email_backend.py +0 -0
  238. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_emails_send_email_message.py +0 -0
  239. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_emails_test_tools.py +0 -0
  240. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_choices.py +0 -0
  241. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_date.py +0 -0
  242. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_decimal.py +0 -0
  243. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_help_text.py +0 -0
  244. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_minutes_duration.py +0 -0
  245. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_one2many.py +0 -0
  246. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_rich_text.py +0 -0
  247. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_fields_time.py +0 -0
  248. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_filters.py +0 -0
  249. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_locale_api.py +0 -0
  250. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_mfa_legacy.py +0 -0
  251. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_mfa_login_api.py +0 -0
  252. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_mfa_setup_api.py +0 -0
  253. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_ordered_rest_view_mixin.py +0 -0
  254. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_perm_tests.py +0 -0
  255. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_permissions.py +0 -0
  256. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_perms_api.py +0 -0
  257. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_post_migrate_groups_update.py +0 -0
  258. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_profiling_middleware.py +0 -0
  259. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_settings.py +0 -0
  260. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_shortcuts.py +0 -0
  261. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_table_file_helpers.py +0 -0
  262. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_test_runner.py +0 -0
  263. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_timezone_middleware.py +0 -0
  264. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_tools.py +0 -0
  265. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_user_job_api.py +0 -0
  266. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_user_job_messages.py +0 -0
  267. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_user_job_model.py +0 -0
  268. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_user_queryset.py +0 -0
  269. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_user_websocket.py +0 -0
  270. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_verbose_names.py +0 -0
  271. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_version_check.py +0 -0
  272. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_view_decorators.py +0 -0
  273. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_view_fields.py +0 -0
  274. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/tests/test_ws_cookie_middleware.py +0 -0
  275. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests/urls.py +0 -0
  276. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/__init__.py +0 -0
  277. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/migrations/__init__.py +0 -0
  278. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/__init__.py +0 -0
  279. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/ci.py +0 -0
  280. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/common.py +0 -0
  281. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/dev.py +0 -0
  282. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/dev_custom_example.py +0 -0
  283. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/settings/dev_default.py +0 -0
  284. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/tests/__init__.py +0 -0
  285. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/tests/test_api.py +0 -0
  286. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/tests/test_auth_api.py +0 -0
  287. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/urls.py +0 -0
  288. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_base_user/views.py +0 -0
  289. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/__init__.py +0 -0
  290. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/migrations/0001_initial.py +0 -0
  291. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/migrations/__init__.py +0 -0
  292. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/models.py +0 -0
  293. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/__init__.py +0 -0
  294. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/ci.py +0 -0
  295. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/common.py +0 -0
  296. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/dev.py +0 -0
  297. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/dev_custom_example.py +0 -0
  298. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/settings/dev_default.py +0 -0
  299. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/tests/__init__.py +0 -0
  300. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/tests/test_api.py +0 -0
  301. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/tests/test_auth_api.py +0 -0
  302. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/urls.py +0 -0
  303. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user/views.py +0 -0
  304. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/__init__.py +0 -0
  305. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/migrations/0001_initial.py +0 -0
  306. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/migrations/0002_lowercase_verbose_names.py +0 -0
  307. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/migrations/__init__.py +0 -0
  308. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/models.py +0 -0
  309. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/providers.py +0 -0
  310. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/scope.py +0 -0
  311. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/__init__.py +0 -0
  312. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/ci.py +0 -0
  313. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/common.py +0 -0
  314. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/dev.py +0 -0
  315. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/dev_custom_example.py +0 -0
  316. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/settings/dev_default.py +0 -0
  317. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/tests/__init__.py +0 -0
  318. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/tests/test_user_job.py +0 -0
  319. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_custom_user_job/urls.py +0 -0
  320. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/__init__.py +0 -0
  321. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/migrations/0001_initial.py +0 -0
  322. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/migrations/__init__.py +0 -0
  323. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/models.py +0 -0
  324. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/__init__.py +0 -0
  325. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/ci.py +0 -0
  326. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/common.py +0 -0
  327. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/dev.py +0 -0
  328. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/dev_custom_example.py +0 -0
  329. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/settings/dev_default.py +0 -0
  330. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/tests/__init__.py +0 -0
  331. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/tests/test_api.py +0 -0
  332. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/tests/test_auth_api.py +0 -0
  333. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/urls.py +0 -0
  334. {django_pfx-1.7.6.dev47 → django_pfx-1.7.6.dev49}/tests_user_email_login/views.py +0 -0
@@ -31,3 +31,7 @@ dev_custom.py
31
31
  /examples/**/venv/
32
32
  /examples/**/db.sqlite3
33
33
  /doc/api/
34
+
35
+ # Copilot
36
+ # As it is for an in-progress Copilot test, ignore these files at this stage
37
+ .github/copilot-*.md
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-pfx
3
- Version: 1.7.6.dev47
3
+ Version: 1.7.6.dev49
4
4
  Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
5
5
  Author: Hervé Martinet
6
6
  Author-email: herve.martinet@gmail.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-pfx
3
- Version: 1.7.6.dev47
3
+ Version: 1.7.6.dev49
4
4
  Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
5
5
  Author: Hervé Martinet
6
6
  Author-email: herve.martinet@gmail.com
@@ -209,6 +209,7 @@ tests/urls.py
209
209
  tests/views.py
210
210
  tests/locale/fr/LC_MESSAGES/django.po
211
211
  tests/migrations/0001_initial.py
212
+ tests/migrations/0002_remove_book_local_file.py
212
213
  tests/migrations/__init__.py
213
214
  tests/settings/__init__.py
214
215
  tests/settings/ci.py
@@ -198,6 +198,7 @@
198
198
  "tests/locale/fr/LC_MESSAGES/django.po",
199
199
  "tests/mfa_urls.py",
200
200
  "tests/migrations/0001_initial.py",
201
+ "tests/migrations/0002_remove_book_local_file.py",
201
202
  "tests/migrations/__init__.py",
202
203
  "tests/models.py",
203
204
  "tests/settings/__init__.py",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.7.5",
3
+ "distance": 49,
4
+ "node": "gde61094faa22c93cc23b0cc622767ada23bd96ca",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-03"
8
+ }
@@ -119,8 +119,11 @@ class MediaField(models.JSONField):
119
119
  b64 = None
120
120
 
121
121
  db_value = getattr(obj, f'_db_{self.name}')
122
- if db_value and (b64 or not value):
123
- setattr(obj, self.name, None)
122
+ db_key = db_value.get('key') if isinstance(db_value, dict) else None
123
+ value_key = value.get('key') if isinstance(value, dict) else None
124
+ if db_value and (b64 or not value_key or value_key != db_key):
125
+ if b64 or not value_key:
126
+ setattr(obj, self.name, None)
124
127
  after_save.append(lambda: delete_file(db_value))
125
128
  if b64:
126
129
  try:
@@ -40,7 +40,7 @@ def get_media_field_response(obj, field, request):
40
40
  url = mediaField.get_url(request, obj)
41
41
  except StorageException as e: # pragma: no cover
42
42
  logger.exception(e)
43
- raise APIError(_("Unexpected storage error", status=500))
43
+ raise APIError(_("Unexpected storage error"), status=500)
44
44
 
45
45
  if mediaField.storage.direct:
46
46
  attr = getattr(obj, field)
@@ -130,7 +130,7 @@ class MediaRestViewMixin(ModelMixin):
130
130
  res = mediaField.get_upload_url(self.request, obj, filename)
131
131
  except StorageException as e: # pragma: no cover
132
132
  logger.exception(e)
133
- raise APIError(_("Unexpected storage error", status=500))
133
+ raise APIError(_("Unexpected storage error"), status=500)
134
134
  return JsonResponse(res)
135
135
 
136
136
  @rest_api(
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2026-10-28 14:02+0100\n"
11
+ "POT-Creation-Date: 2026-11-03 10:30+0100\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,11 +18,11 @@ msgstr ""
18
18
  "Content-Transfer-Encoding: 8bit\n"
19
19
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
20
20
 
21
- #: models.py:58
21
+ #: models.py:57
22
22
  msgid "First Name"
23
23
  msgstr "Prénom"
24
24
 
25
- #: models.py:59
25
+ #: models.py:58
26
26
  msgid "Last Name"
27
27
  msgstr "Nom"
28
28
 
@@ -0,0 +1,18 @@
1
+ # Generated by Django 5.2.18 on 2026-11-03 09:24
2
+ # flake8: noqa
3
+
4
+ from django.db import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+
9
+ dependencies = [
10
+ ('tests', '0001_initial'),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.RemoveField(
15
+ model_name='book',
16
+ name='local_file',
17
+ ),
18
+ ]
@@ -19,7 +19,6 @@ from pfx.pfxcore.models import (
19
19
  UniqueConstraint,
20
20
  UserFilteredQuerySetMixin,
21
21
  )
22
- from pfx.pfxcore.storage import LocalStorage
23
22
 
24
23
 
25
24
  class User(CacheableMixin, MFAUserMixin, AbstractPFXUser):
@@ -140,9 +139,6 @@ class Book(CacheDependsMixin, PFXModelMixin, models.Model):
140
139
  "Reference", max_length=30, null=True, blank=True)
141
140
  cover = MediaField(
142
141
  "Cover", auto_delete=True, blank=True, null=True)
143
- local_file = MediaField(
144
- "Cover", auto_delete=True, blank=True, null=True,
145
- storage=LocalStorage())
146
142
  read_time = MinutesDurationField("Read Time", null=True, blank=True)
147
143
 
148
144
  class Meta:
@@ -1,19 +1,14 @@
1
1
  from datetime import date
2
- from pathlib import Path
3
- from unittest.mock import MagicMock, patch
2
+ from unittest.mock import patch
4
3
 
5
- from django.conf import settings
6
4
  from django.db import connection
7
5
  from django.test import TestCase, override_settings
8
6
 
9
- from pfx.pfxcore.test import APIClient, MockBoto3Client, TestAssertMixin
7
+ from pfx.pfxcore.test import APIClient, TestAssertMixin
10
8
  from tests import views
11
9
  from tests.models import Author, Book, BookType
12
10
 
13
11
 
14
- @override_settings(
15
- STORAGE_LOCAL_ROOT='/tmp/django-pfx-filestore',
16
- STORAGE_LOCAL_X_ACCEL_REDIRECT=False)
17
12
  class BasicAPITest(TestAssertMixin, TestCase):
18
13
 
19
14
  def setUp(self):
@@ -767,21 +762,6 @@ class BasicAPITest(TestAssertMixin, TestCase):
767
762
  response = self.client.get('/api/authors/slug/not-existent')
768
763
  self.assertRC(response, 404)
769
764
 
770
- def test_get_null_key_media_file(self):
771
- response = self.client.get(f'/api/books/{self.author1_book1.pk}')
772
- self.assertRC(response, 200)
773
- self.assertJE(response, 'cover', None)
774
- self.assertJE(response, 'local_file', None)
775
-
776
- self.author1_book1.cover = dict(key=None)
777
- self.author1_book1.local_file = dict(key=None)
778
- self.author1_book1.save()
779
-
780
- response = self.client.get(f'/api/books/{self.author1_book1.pk}')
781
- self.assertRC(response, 200)
782
- self.assertJE(response, 'cover', None)
783
- self.assertJE(response, 'local_file', None)
784
-
785
765
  def test_create(self):
786
766
  response = self.client.post(
787
767
  '/api/authors', dict(
@@ -807,203 +787,6 @@ class BasicAPITest(TestAssertMixin, TestCase):
807
787
  self.assertJE(response, 'types.@0.pk', self.type_sf.pk)
808
788
  self.assertJE(response, 'types.@1.pk', self.type_fantastique.pk)
809
789
 
810
- def test_create_file(self):
811
- response = self.client.post('/api/books', dict(
812
- name="Test Book",
813
- author=self.author1.pk,
814
- pub_date='2000-01-01',
815
- local_file=dict(
816
- name='test.txt',
817
- base64='data:text/plain;charset=utf-8;'
818
- 'base64,VGVzdCBjb250ZW50')))
819
- book_pk = self.get_val(response, 'pk')
820
- self.assertRC(response, 200)
821
- self.assertJE(response, 'local_file.content-length', '12')
822
- self.assertJE(response, 'local_file.content-type', 'text/plain')
823
- self.assertJEExists(response, 'local_file.key')
824
- self.assertJE(response, 'local_file.name', 'test.txt')
825
- self.assertJE(
826
- response, 'local_file.url', f"/books/{book_pk}/local_file")
827
- key1 = self.get_val(response, 'local_file.key')
828
- self.assertTrue(Path(f'/tmp/django-pfx-filestore/{key1}').exists())
829
-
830
- # Replace file
831
- with self.captureOnCommitCallbacks(execute=True):
832
- response = self.client.put(f'/api/books/{book_pk}', dict(
833
- local_file=dict(
834
- name='test2.txt',
835
- base64='data:text/plain;charset=utf-8;'
836
- 'base64,TmV3IGNvbnRlbnQ=')))
837
- self.assertRC(response, 200)
838
- self.assertNJE(response, 'local_file.key', key1)
839
- self.assertJE(response, 'local_file.name', 'test2.txt')
840
- self.assertFalse(Path(f'/tmp/django-pfx-filestore/{key1}').exists())
841
- key2 = self.get_val(response, 'local_file.key')
842
- self.assertTrue(Path(f'/tmp/django-pfx-filestore/{key2}').exists())
843
-
844
- # Delete file
845
- with self.captureOnCommitCallbacks(execute=True):
846
- response = self.client.put(f'/api/books/{book_pk}', dict(
847
- local_file=None))
848
- self.assertRC(response, 200)
849
- self.assertJE(response, 'local_file', None)
850
- self.assertFalse(Path(f'/tmp/django-pfx-filestore/{key2}').exists())
851
-
852
- def _create_book_with_file(self, name):
853
- response = self.client.post('/api/books', dict(
854
- name=name,
855
- author=self.author1.pk,
856
- pub_date='2000-01-01',
857
- local_file=dict(
858
- name='test.txt',
859
- base64='data:text/plain;charset=utf-8;'
860
- 'base64,VGVzdCBjb250ZW50')))
861
- self.assertRC(response, 200)
862
- return (
863
- self.get_val(response, 'pk'),
864
- self.get_val(response, 'local_file.key'))
865
-
866
- def _replace_file(self, book):
867
- book.local_file = dict(
868
- name='new.txt',
869
- base64='data:text/plain;charset=utf-8;base64,TmV3IGNvbnRlbnQ=')
870
- with self.captureOnCommitCallbacks(execute=True):
871
- funcs = Book._meta.get_field('local_file').media_pre_save(book)
872
- book.save()
873
- for func in funcs:
874
- func()
875
- return book.local_file['key']
876
-
877
- def test_replace_file_after_loading_another_object(self):
878
- """Replacing a file deletes the old file of that object only.
879
-
880
- The original value used to live on the field, shared by every
881
- instance of the model: loading a second book overwrote it, and
882
- replacing the first book's file deleted the second book's file
883
- while leaving the first one's old file orphaned.
884
- """
885
- pk1, key1 = self._create_book_with_file("Book 1")
886
- pk2, key2 = self._create_book_with_file("Book 2")
887
-
888
- book1 = Book.objects.get(pk=pk1)
889
- Book.objects.get(pk=pk2)
890
- self._replace_file(book1)
891
-
892
- self.assertFalse(Path(f'/tmp/django-pfx-filestore/{key1}').exists())
893
- self.assertTrue(Path(f'/tmp/django-pfx-filestore/{key2}').exists())
894
-
895
- def test_replace_file_twice_on_same_instance(self):
896
- """The original value follows each save, so a second replacement
897
- on the same instance deletes the file of the first one rather
898
- than the long-gone file it was loaded with."""
899
- pk, key = self._create_book_with_file("Book")
900
-
901
- book = Book.objects.get(pk=pk)
902
- new_key = self._replace_file(book)
903
- self.assertTrue(
904
- Path(f'/tmp/django-pfx-filestore/{new_key}').exists())
905
- self._replace_file(book)
906
-
907
- self.assertFalse(Path(f'/tmp/django-pfx-filestore/{key}').exists())
908
- self.assertFalse(
909
- Path(f'/tmp/django-pfx-filestore/{new_key}').exists())
910
-
911
- def test_create_file_rejects_non_data_uri(self):
912
- """A media upload only accepts a ``data:`` URI.
913
-
914
- The content used to be handed to ``urlopen``, so ``file://`` made
915
- the server read a local file and ``http://`` reach the network.
916
- Both are refused now, with a field error, before anything is read.
917
- """
918
- for uri in (
919
- 'file:///etc/hostname',
920
- 'http://169.254.169.254/latest/meta-data/',
921
- 'not a uri at all'):
922
- response = self.client.post('/api/books', dict(
923
- name="Test Book",
924
- author=self.author1.pk,
925
- pub_date='2000-01-01',
926
- local_file=dict(name='x.txt', base64=uri)))
927
- self.assertRC(response, 422)
928
- self.assertJEExists(response, 'local_file')
929
-
930
- def test_create_file_url_encoded_data_uri(self):
931
- """A ``data:`` URI without ``;base64`` is percent-decoded, as
932
- ``urlopen`` did, so that path keeps working without it."""
933
- response = self.client.post('/api/books', dict(
934
- name="Test Book",
935
- author=self.author1.pk,
936
- pub_date='2000-01-01',
937
- local_file=dict(
938
- name='test.txt', base64='data:text/plain,Hello%20world')))
939
- self.assertRC(response, 200)
940
- self.assertJE(response, 'local_file.content-length', '11')
941
-
942
- def test_get_file_content_disposition(self):
943
- """The file name must survive both local serving paths.
944
-
945
- The name holds "…", outside latin-1: written by hand into the
946
- X-Accel header, it made Django MIME-encode the whole value
947
- (`=?utf-8?q?…?=`), which browsers cannot read, so "inline" was
948
- lost. The ";" would also have cut the unquoted name short.
949
- FileResponse is checked too, as both paths must agree.
950
- A PDF, so that "inline" is honoured.
951
- """
952
- response = self.client.post('/api/books', dict(
953
- name="Test Book",
954
- author=self.author1.pk,
955
- pub_date='2000-01-01',
956
- local_file=dict(
957
- name='Crédit; école[…].pdf',
958
- base64='data:application/pdf;base64,VGVzdCBjb250ZW50')))
959
- self.assertRC(response, 200)
960
- url = f"/api/books/{self.get_val(response, 'pk')}/local_file"
961
- name = (
962
- "filename*=utf-8''"
963
- "Cr%C3%A9dit%3B%20%C3%A9cole%5B%E2%80%A6%5D.pdf")
964
-
965
- for x_accel in (True, False):
966
- with override_settings(STORAGE_LOCAL_X_ACCEL_REDIRECT=x_accel):
967
- response = self.client.get(url)
968
- self.assertRC(response, 200)
969
- self.assertEqual(
970
- response['Content-Disposition'], f"attachment; {name}")
971
-
972
- response = self.client.get(f"{url}?inline=true")
973
- self.assertRC(response, 200)
974
- self.assertEqual(
975
- response['Content-Disposition'], f"inline; {name}")
976
-
977
- def test_get_file_inline_unsafe_type(self):
978
- """A file the browser would render as a page is never inline.
979
-
980
- Served from the application domain, an HTML or SVG file opened
981
- with "?inline=true" would run its scripts with the session of
982
- whoever follows the link. The type is guessed from the name at
983
- upload, so the name alone decides; both serving paths are checked.
984
- """
985
- for filename, inline in (
986
- ('page.html', False), ('image.svg', False),
987
- ('note.txt', False), ('photo.png', True)):
988
- response = self.client.post('/api/books', dict(
989
- name=f"Book {filename}",
990
- author=self.author1.pk,
991
- pub_date='2000-01-01',
992
- local_file=dict(
993
- name=filename,
994
- base64='data:text/html;base64,'
995
- 'PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==')))
996
- self.assertRC(response, 200)
997
- url = f"/api/books/{self.get_val(response, 'pk')}/local_file"
998
- for x_accel in (True, False):
999
- with self.subTest(filename=filename, x_accel=x_accel), \
1000
- override_settings(
1001
- STORAGE_LOCAL_X_ACCEL_REDIRECT=x_accel):
1002
- response = self.client.get(f"{url}?inline=true")
1003
- self.assertRC(response, 200)
1004
- self.assertTrue(response['Content-Disposition'].startswith(
1005
- 'inline;' if inline else 'attachment;'))
1006
-
1007
790
  def test_create_null_values(self):
1008
791
  response = self.client.post(
1009
792
  '/api/books', dict(
@@ -1152,32 +935,6 @@ class BasicAPITest(TestAssertMixin, TestCase):
1152
935
  self.assertJE(
1153
936
  response, 'gender.@0', "Value 'writer' is not a valid choice.")
1154
937
 
1155
- @override_settings(
1156
- STORAGE_S3_AWS_REGION="fake-region",
1157
- STORAGE_S3_AWS_ACCESS_KEY="FAKE",
1158
- STORAGE_S3_AWS_SECRET_KEY="FAKE-SECRET",
1159
- STORAGE_S3_AWS_S3_BUCKET="dragonfly.fake",
1160
- STORAGE_S3_AWS_GET_URL_EXPIRE=300,
1161
- STORAGE_S3_AWS_PUT_URL_EXPIRE=300)
1162
- def test_update_null_file(self):
1163
- """Empty keys will return None through API, then ensure we can
1164
- save with None as file."""
1165
- Path(settings.STORAGE_LOCAL_ROOT).mkdir(parents=True, exist_ok=True)
1166
-
1167
- self.author1_book1.cover = dict(key="")
1168
- self.author1_book1.local_file = dict(key="")
1169
- self.author1_book1.save()
1170
-
1171
- with self.captureOnCommitCallbacks(execute=True):
1172
- response = self.client.put(
1173
- f'/api/books/{self.author1_book1.pk}', dict(
1174
- name="The Hobbit, Deluxe Edition",
1175
- local_file=None,
1176
- cover=None))
1177
- self.assertRC(response, 200)
1178
- self.assertJE(response, 'cover', None)
1179
- self.assertJE(response, 'local_file', None)
1180
-
1181
938
  def test_empty_number_fields(self):
1182
939
  response = self.client.post(
1183
940
  '/api/books', {
@@ -1412,61 +1169,6 @@ class BasicAPITest(TestAssertMixin, TestCase):
1412
1169
  self.assertJE(response, 'name', book_type.name)
1413
1170
  self.assertJE(response, 'slug', book_type.slug)
1414
1171
 
1415
- @override_settings(
1416
- STORAGE_S3_AWS_REGION="fake-region",
1417
- STORAGE_S3_AWS_ACCESS_KEY="FAKE",
1418
- STORAGE_S3_AWS_SECRET_KEY="FAKE-SECRET",
1419
- STORAGE_S3_AWS_S3_BUCKET="dragonfly.fake",
1420
- STORAGE_S3_AWS_GET_URL_EXPIRE=300,
1421
- STORAGE_S3_AWS_PUT_URL_EXPIRE=300)
1422
- @patch("boto3.client", MagicMock(return_value=MockBoto3Client()))
1423
- def test_media_field(self):
1424
- key = f"Book/{self.author1_book1.pk}/cover.png"
1425
- response = self.client.get(
1426
- f'/api/books/{self.author1_book1.pk}/cover/upload-url/'
1427
- 'cover.png?content-type=image/png')
1428
- self.assertRC(response, 200)
1429
- self.assertJE(response, 'file.key', key)
1430
- self.assertJE(response, 'file.name', "cover.png")
1431
- self.assertJE(
1432
- response, 'url', f"http://dragonfly.fake/{key}")
1433
-
1434
- response = self.client.put(f'/api/books/{self.author1_book1.pk}', dict(
1435
- cover=response.json_content['file']))
1436
- self.assertRC(response, 200)
1437
- self.assertJE(response, 'cover.key', key)
1438
- self.assertJE(response, 'cover.name', "cover.png")
1439
- self.assertJE(response, 'cover.content-length', 1000)
1440
- self.assertJE(response, 'cover.content-type', "image/png")
1441
-
1442
- response = self.client.get(
1443
- f'/api/books/{self.author1_book1.pk}/cover')
1444
- self.assertRC(response, 200)
1445
- self.assertJE(
1446
- response, 'url', f"http://dragonfly.fake/{key}")
1447
-
1448
- response = self.client.get(
1449
- f'/api/books/{self.author1_book1.pk}/cover?redirect=false')
1450
- self.assertRC(response, 200)
1451
- self.assertJE(
1452
- response, 'url', f"http://dragonfly.fake/{key}")
1453
-
1454
- response = self.client.get(
1455
- f'/api/books/{self.author1_book1.pk}/cover?redirect=true')
1456
- self.assertRedirects(
1457
- response, f"http://dragonfly.fake/{key}",
1458
- fetch_redirect_response=False)
1459
-
1460
- with (patch.object(
1461
- MockBoto3Client, 'delete_object',
1462
- return_value=None) as mock_delete,
1463
- self.captureOnCommitCallbacks(execute=True)):
1464
- response = self.client.delete(
1465
- f'/api/books/{self.author1_book1.pk}')
1466
- mock_delete.assert_called_with(
1467
- Bucket='dragonfly.fake',
1468
- Key=key)
1469
-
1470
1172
  def test_annotate_meta_service(self):
1471
1173
  response = self.client.get('/api/authors-annotate/meta')
1472
1174
  self.assertRC(response, 200)
@@ -1,3 +1,4 @@
1
+ import tempfile
1
2
  from pathlib import Path
2
3
  from unittest.mock import patch
3
4
 
@@ -60,11 +61,16 @@ urlpatterns = [
60
61
 
61
62
  @override_settings(
62
63
  ROOT_URLCONF=__name__,
63
- STORAGE_LOCAL_ROOT='/tmp/django-pfx-filestore',
64
64
  STORAGE_LOCAL_X_ACCEL_REDIRECT=False)
65
65
  class TestFieldsMediaLocal(TestAssertMixin, TestCase):
66
66
 
67
67
  def setUp(self):
68
+ self.filestore_directory = tempfile.TemporaryDirectory()
69
+ self.addCleanup(self.filestore_directory.cleanup)
70
+ storage_settings = override_settings(
71
+ STORAGE_LOCAL_ROOT=self.filestore_directory.name)
72
+ storage_settings.enable()
73
+ self.addCleanup(storage_settings.disable)
68
74
  self.client = APIClient(default_locale='en')
69
75
 
70
76
  @classmethod
@@ -86,6 +92,133 @@ class TestFieldsMediaLocal(TestAssertMixin, TestCase):
86
92
  1 for path in self.filestore.rglob("*")
87
93
  if path.is_file())
88
94
 
95
+ def create_media_object(self, filename='test.txt', content="Test content"):
96
+ obj = TestLocalMediaModel.objects.create()
97
+ obj.file = self.upload_file(obj, 'file', filename, content)
98
+ obj.full_clean()
99
+ obj.save()
100
+ return obj
101
+
102
+ def test_get_null_key(self):
103
+ obj = TestLocalMediaModel.objects.create()
104
+ response = self.client.get(f'/api/test/{obj.pk}')
105
+ self.assertRC(response, 200)
106
+ self.assertJE(response, 'file', None)
107
+
108
+ obj.file = dict(key=None)
109
+ obj.save()
110
+ response = self.client.get(f'/api/test/{obj.pk}')
111
+ self.assertRC(response, 200)
112
+ self.assertJE(response, 'file', None)
113
+
114
+ def test_update_null_file(self):
115
+ obj = TestLocalMediaModel.objects.create()
116
+ obj.file = dict(key='')
117
+ obj.save()
118
+
119
+ with self.captureOnCommitCallbacks(execute=True):
120
+ response = self.client.put(
121
+ f'/api/test/{obj.pk}', dict(file=None))
122
+ self.assertRC(response, 200)
123
+ self.assertJE(response, 'file', None)
124
+
125
+ def _replace_file(self, obj):
126
+ obj.file = dict(
127
+ name='new.txt',
128
+ base64=self.as_data_url("New content"))
129
+ with self.captureOnCommitCallbacks(execute=True):
130
+ funcs = TestLocalMediaModel._meta.get_field(
131
+ 'file').media_pre_save(obj)
132
+ obj.save()
133
+ for func in funcs:
134
+ func()
135
+ return obj.file['key']
136
+
137
+ def test_replace_file_after_loading_another_object(self):
138
+ obj1 = self.create_media_object()
139
+ obj2 = self.create_media_object()
140
+ key1 = obj1.file['key']
141
+ key2 = obj2.file['key']
142
+
143
+ obj1 = TestLocalMediaModel.objects.get(pk=obj1.pk)
144
+ TestLocalMediaModel.objects.get(pk=obj2.pk)
145
+ self._replace_file(obj1)
146
+
147
+ self.assertFalse((self.filestore / key1).exists())
148
+ self.assertTrue((self.filestore / key2).exists())
149
+
150
+ def test_replace_file_twice_on_same_instance(self):
151
+ obj = self.create_media_object()
152
+ key = obj.file['key']
153
+
154
+ obj = TestLocalMediaModel.objects.get(pk=obj.pk)
155
+ new_key = self._replace_file(obj)
156
+ self.assertTrue((self.filestore / new_key).exists())
157
+ self._replace_file(obj)
158
+
159
+ self.assertFalse((self.filestore / key).exists())
160
+ self.assertFalse((self.filestore / new_key).exists())
161
+
162
+ def test_create_rejects_non_data_uri(self):
163
+ for uri in (
164
+ 'file:///etc/hostname',
165
+ 'http://169.254.169.254/latest/meta-data/',
166
+ 'not a uri at all'):
167
+ response = self.client.post('/api/test', dict(
168
+ file=dict(name='x.txt', base64=uri)))
169
+ self.assertRC(response, 422)
170
+ self.assertJEExists(response, 'file')
171
+
172
+ def test_create_url_encoded_data_uri(self):
173
+ response = self.client.post('/api/test', dict(
174
+ file=dict(
175
+ name='test.txt', base64='data:text/plain,Hello%20world')))
176
+ self.assertRC(response, 200)
177
+ self.assertJE(response, 'file.content-length', '11')
178
+
179
+ def test_get_file_content_disposition(self):
180
+ obj = TestLocalMediaModel.objects.create()
181
+ obj.file = self.upload_file(
182
+ obj, 'file', 'Crédit; école[…].pdf', "Test content")
183
+ obj.full_clean()
184
+ obj.save()
185
+ url = f'/api/test/{obj.pk}/file'
186
+ name = (
187
+ "filename*=utf-8''"
188
+ "Cr%C3%A9dit%3B%20%C3%A9cole%5B%E2%80%A6%5D.pdf")
189
+
190
+ for x_accel in (True, False):
191
+ with override_settings(STORAGE_LOCAL_X_ACCEL_REDIRECT=x_accel):
192
+ response = self.client.get(url)
193
+ self.assertRC(response, 200)
194
+ self.assertEqual(
195
+ response['Content-Disposition'], f'attachment; {name}')
196
+
197
+ response = self.client.get(f'{url}?inline=true')
198
+ self.assertRC(response, 200)
199
+ self.assertEqual(
200
+ response['Content-Disposition'], f'inline; {name}')
201
+
202
+ def test_get_file_inline_unsafe_type(self):
203
+ for filename, inline in (
204
+ ('page.html', False), ('image.svg', False),
205
+ ('note.txt', False), ('photo.png', True)):
206
+ with self.subTest(filename=filename):
207
+ obj = self.create_media_object(
208
+ filename,
209
+ '<script>alert(1)</script>')
210
+ url = f'/api/test/{obj.pk}/file?inline=true'
211
+ for x_accel in (True, False):
212
+ with (
213
+ self.subTest(x_accel=x_accel),
214
+ override_settings(
215
+ STORAGE_LOCAL_X_ACCEL_REDIRECT=x_accel)):
216
+ response = self.client.get(url)
217
+ self.assertRC(response, 200)
218
+ self.assertTrue(
219
+ response['Content-Disposition'].startswith(
220
+ 'inline;' if inline else 'attachment;'))
221
+
89
222
  def test_get(self):
90
223
  obj = TestLocalMediaModel.objects.create()
91
224
  obj.file = self.upload_file(
@@ -103,7 +236,7 @@ class TestFieldsMediaLocal(TestAssertMixin, TestCase):
103
236
  self.assertJE(
104
237
  response, 'file.url', f"/test/{obj.pk}/file")
105
238
  key = self.get_val(response, 'file.key')
106
- path = Path(f'/tmp/django-pfx-filestore/{key}')
239
+ path = self.filestore / key
107
240
  self.assertTrue(path.exists())
108
241
  with open(path, 'r') as f:
109
242
  self.assertEqual(f.read(), "Test content")