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

Some model forms need refactoring #10

Open
bronger opened this issue Jun 28, 2016 · 0 comments
Open

Some model forms need refactoring #10

bronger opened this issue Jun 28, 2016 · 0 comments

Comments

@bronger
Copy link
Contributor

bronger commented Jun 28, 2016

The model forms that use choices_of_content_types need to be refactored. This work has begun in the branch “choices_of_content_types”. Unfortunately, this is not easy, so I had to stop this due to time constraints. Things need to be considered:

  • How can the code be simplified, now that the choices tuples have a ContentType instance in their second field?
  • Is it necessary to re-define many of the fields?
  • Is it necessary to save M2M relations to ContentType separately after the ModelForm.save()?
  • Is __all__ necessary?

Of course, it needs to be tested:

  • Whether the ordering really is according to the name of the ContentType.
  • Whether everything is still properly saved.
  • Whether empty MultipleChoiceFields are properly displayed and processed.
bronger added a commit that referenced this issue Jun 28, 2016
This is only a partial work, and totally untested.  See
#10 for further information.
bronger added a commit that referenced this issue Jun 28, 2016
This is only a partial work, and totally untested.  See
#10 for further information.
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

1 participant