django-simple-history icon indicating copy to clipboard operation
django-simple-history copied to clipboard

Improve support to django model translation fields

Open natanrmaia opened this issue 1 year ago • 3 comments

Description

The proposed change converts the django model translations fields to char or text fields, this way django-simple-history can iterate better and change its properties.

Related Issue

https://github.com/jazzband/django-simple-history/issues/1299

Motivation and Context

Django Simple History cannot change django model translation field properties correctly in its current version.

How Has This Been Tested?

Creating new models with django model translation fields and changing old models.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] I have run the pre-commit run command to format and lint.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [X] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [X] I have added my name and/or github handle to AUTHORS.rst
  • [ ] I have added my change to CHANGES.rst
  • [X] All new and existing tests passed.

natanrmaia avatar Jan 25 '24 21:01 natanrmaia

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (f48b53d) 96.87% compared to head (b81fbc1) 96.26%.

Files Patch % Lines
simple_history/models.py 0.00% 6 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
- Coverage   96.87%   96.26%   -0.61%     
==========================================
  Files          23       23              
  Lines        1278     1286       +8     
  Branches      211      214       +3     
==========================================
  Hits         1238     1238              
- Misses         21       27       +6     
- Partials       19       21       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 25 '24 21:01 codecov[bot]

Can I ask what these TranslationCharField and TranslationTextField classes are? Nothing relevant comes up when I google them, and so it seems like they're part of some of your project's code..? 🤔

Also, if you're sure that the issue lies with django-simple-history, could you add some tests that demonstrate your original issue? 🙂

ddabble avatar Feb 17 '24 16:02 ddabble

Can I ask what these TranslationCharField and TranslationTextField classes are? Nothing relevant comes up when I google them, and so it seems like they're part of some of your project's code..? 🤔

Also, if you're sure that the issue lies with django-simple-history, could you add some tests that demonstrate your original issue? 🙂

Hello! we're talking about this in issue https://github.com/jazzband/django-simple-history/issues/1299

natanrmaia avatar Feb 17 '24 16:02 natanrmaia

Closing due to stale issue; see https://github.com/jazzband/django-simple-history/issues/1299#issuecomment-2096951303

ddabble avatar May 06 '24 21:05 ddabble