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

Field Order #99

Open
dgleba opened this issue Sep 12, 2020 · 8 comments
Open

Field Order #99

dgleba opened this issue Sep 12, 2020 · 8 comments

Comments

@dgleba
Copy link

dgleba commented Sep 12, 2020

Is there a way to re-order fields in the model when using https://djangobuilder.io/#/project/FJsbPtioNSAqK2SwRXIv ?

@mmcardle
Copy link
Owner

Hi @dgleba

Thanks for the feedback, do you mean the order of the fields in the UI, or the order in the models.py output, or both? :)

@dgleba
Copy link
Author

dgleba commented Sep 14, 2020

I would like to reorder them in the UI and then have the output models.py follow that order. So both.

@mmcardle
Copy link
Owner

👍 Great i will see what i can do.

@dgleba
Copy link
Author

dgleba commented Sep 14, 2020

How about this for an idea to just get things going.

Always have one field selected/highlighted. Allow the user to add before or after that field.

@karbassi
Copy link

karbassi commented Jan 26, 2021

A "drag and drop" reordering would be great.

Thanks for a great project/tool.

@Reventlow
Copy link

I would love a reorder of the fields and also the modules

@dgleba
Copy link
Author

dgleba commented Oct 28, 2023

Any order would be helpful. Right now it randomly changes as you go along.

Even pinning it to the original order would be helpful. Would that require adding an integer column and auto-filling it as entries are made?

@mmcardle
Copy link
Owner

There was a bug in the ordering logic, it should be fixed now.
The ordering should be:

  1. Models with no parents (ordered lexicographically)
  2. Models with parents (ordered lexicographically)

This should reduce the risk of parent models appearing after child models

mmcardle added a commit that referenced this issue Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants