Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding ability to specify default_order_field on ModelAdmin #198

Closed
wants to merge 1 commit into from
Closed

Adding ability to specify default_order_field on ModelAdmin #198

wants to merge 1 commit into from

Conversation

theunraveler
Copy link
Contributor

Hello. This PR adds the ability to manually specify an ordering field, in case you'd like to use a field other than the first on in Model._meta.ordering. Instead, you can just do this:

class MyModelAdmin(SortableAdmin):
    default_order_field = 'created_at'

@jrief
Copy link
Owner

jrief commented Jul 24, 2018

I am missing a reference in docs/source/usage.rstabout this new feature.

Could you please explain the use-case for this feature.

Thanks

@theunraveler
Copy link
Contributor Author

Ah, upon closer review, you can override the default ordering with ModelAdmin.ordering, making this PR redundant. Thanks, and sorry for the noise.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants