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

Upcoming refactor: building hvad2 #273

Open
6 of 9 tasks
spectras opened this issue Dec 25, 2015 · 1 comment
Open
6 of 9 tasks

Upcoming refactor: building hvad2 #273

spectras opened this issue Dec 25, 2015 · 1 comment
Assignees
Milestone

Comments

@spectras
Copy link
Collaborator

spectras commented Dec 25, 2015

django-hvad will undergo its second major refactor. There is no release schedule.

For the first time in hvad history, there will be some deep changes in the API. From the outside, the changes will be minor but will not be as seamless as they usually are. This is required to enable hvad to leverage the features of new versions of Django. To ease transition, we will keep supporting hvad1 alongside hvad2 for about a year from release of hvad2.

For now, hvad1 is still branch master, while work on hvad2 is done on git branch dev/hvad2.

This issue will track ongoing work.


Those have been merged into hvad1:

  • Clean up code: drop all obsolete code:
    • Code to support Django < 1.8.
    • Code to support Python < 2.7
    • Code to support obsolete FallbackQueryset (that has been replaced with .fallbacks()).
    • Code to give details about old deprecation errors.
  • Namespace settings: move hvad settings to settings.HVAD.

Those are still either on hvad2 branch, wip, or still on todo list:

  • Extra restriction based queries: refactor query building to use an INNER JOIN with extra constrain instead of patching fields dynamically.
    • Deep select_related() rework to leverage the INNER JOIN.
  • Prevent creation of untranslated objects (see Notes for the future #249).
  • Switch back TranslationQueryset.model to shared model (see Notes for the future #249).
  • Formalize interactions of translations cache, so hvad takes full control of it.
  • Get rid of TranslationAwareQueryset. Instead, enable TranslationQueryset to work on non-translatable models as well.
  • Refactor admin
    • todo

Should you want to look at current state, it is available as the dev/hvad2 branch. As I am working alone atm, I occasionally rewrite history, so if you feel like lending a hand, please tell me first so I don't mess up your git tree.

@spectras
Copy link
Collaborator Author

spectras commented Apr 28, 2017

Update on hvad2: some design issues halted development for now.
The core feature of hvad2 is the extra-restriction-based query, and there are corner cases that are very hard to solve without going deep into Django ORM, something that's against hvad design.

On the brighter side, implemented features are slowly integrated into hvad1, as long as they don't incur too drastic changes. As of today, code cleanup and settings namespacing have already been merged.

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