Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Request for Info] Difference between path and ordering #20

Open
SafaAlfulaij opened this issue Jun 13, 2021 · 1 comment
Open

[Request for Info] Difference between path and ordering #20

SafaAlfulaij opened this issue Jun 13, 2021 · 1 comment

Comments

@SafaAlfulaij
Copy link
Contributor

SafaAlfulaij commented Jun 13, 2021

Hi!
I got confused between path and ordering fields now that I'm using UUID as primary keys. I don't know how they should be with integer keys, hence this question.
Currently, both fields are exactly equal and contain the uuid of the records. Is this right? Or is it because of my UUID primary keys? And what should each represent?
Thanks and sorry if this looks like a basic database question :\

@matthiask
Copy link
Member

Hi @SafaAlfulaij

Yeah, if you don't specify a ordering the siblings will be ordered according to their primary key value.

feincms3 pages use a position field so that content managers may reorder pages in menus on the site (see https://github.com/matthiask/feincms3/blob/ae9ef1aa48062744f3c3fa09f10b4505d5319eac/feincms3/pages.py#L62) and it also offers an interface to do this (see https://github.com/matthiask/feincms3/blob/ae9ef1aa48062744f3c3fa09f10b4505d5319eac/feincms3/admin.py#L54). Here's how this looks:
image

I hope this clarifies things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants