agateblue / agateblue/django-dynamic-preferences

Add optional "ordering" parameter to Section() and BasePreferenceType() for easier

Đang mở
#90 2 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
359
Fork
86
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Right now, both sections and preferences are listed in the order in which they are discovered and loaded into the dynamic preferences registry. However, in a project with multiple apps, it is not always possible to order the apps in `INSTALLED_APPS` so that the sections and individual preferences show up in a sensible order. It is not necessarily desirable to build a form that explicitly orders these preferences, either, since that creates dependencies between otherwise independent apps. Having some more direct control over the display order of both sections and individual preferences would be particularly helpful in these instances.

Default behavior should probably be that preferences without an explicit order value are either displayed last, or (perhaps preferably) are assigned a specific value, so that preferences can be easily ordered to show up either first or last without requiring the ordering to be explicitly defined for each preference. Ties can be broken in the order of discovery, so the existing ordering is preserved in the default situation of no order parameters specified.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.