Changes between Initial Version and Version 1 of Ticket #32382


Ignore:
Timestamp:
Jan 25, 2021, 4:54:20 AM (4 years ago)
Author:
Adam Johnson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32382 – Description

    initial v1  
    1 My third party package django-read-only is implemented as a single file ([pre-3.1-support source](https://github.com/adamchainz/django-read-only/blob/e95530273fd75da34fd77b1625549ffd3840beaa/src/django_read_only.py)). With Django <3.2's `default_app_config`, it could point to its app config within the same module by defining `default_app_config`.
     1My third party package django-read-only is implemented as a single file ([https://github.com/adamchainz/django-read-only/blob/e95530273fd75da34fd77b1625549ffd3840beaa/src/django_read_only.py pre-3.1-support source]). With Django <3.2's `default_app_config`, it could point to its app config within the same module by defining `default_app_config`.
    22
    33Now the AppConfig logic *requires* an `apps` submodule, which means apps cannot be single-file modules but have to be packages.
    44
    5 To work around this in django-read-only I made it into package, left all the logic in its `__init__.py`, and added a "dummy" `apps.py` that has only the line `from django_read_only import DjangoReadOnlyAppConfig` (moving the app config would complicate its implementation).
     5To work around this in django-read-only I made it into package, left all the logic in its `__init__.py`, and added a "dummy" `apps.py` that has only the line `from django_read_only import DjangoReadOnlyAppConfig` (moving the app config would complicate its implementation). ([https://github.com/adamchainz/django-read-only/pull/37/commits/392056b4bbc1eb1ce25b159134e2ab114ca0cdcb commit ])
    66
    77Could we make the apps logic not search for an 'apps' submodule in the case of non-package modules, and instead check in the base module?
Back to Top