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

Improve support to django model translation fields #1304

Closed
wants to merge 4 commits into from

Conversation

natanrmaia
Copy link

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

#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

  • 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.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

natanrmaia and others added 4 commits January 25, 2024 18:20
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.

This resolves the issue brought up in issue jazzband#1299.
Copy link

codecov bot commented Jan 25, 2024

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 ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ddabble
Copy link
Member

ddabble commented Feb 17, 2024

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? 🙂

@natanrmaia
Copy link
Author

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 #1299

@ddabble
Copy link
Member

ddabble commented May 6, 2024

Closing due to stale issue; see #1299 (comment)

@ddabble ddabble closed this May 6, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants