Skip to content

Conversation

Eeshu-Yadav
Copy link
Contributor

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #600.

Description of Changes

This PR replaces the third-party jsonfield library with Django's built-in JSONField. The third-party JSONField library hasn't received updates in 5 years, while Django's built-in JSONField is now mature and actively maintained.

Changes Made:

  • Replaced from jsonfield import JSONField with from django.db.models import JSONField in models
  • Updated RadiusBatch.user_credentials and OrganizationRadiusSettings.sms_meta_data fields
  • Removed "jsonfield~=3.1.0" dependency from setup.py
  • Added migration 0041_replace_jsonfield_with_django_builtin.py to handle field type transition
  • Updated test migrations to use Django's JSONField

Testing:

  • All existing tests pass with the new implementation
  • Verified RadiusBatch and SMS metadata functionality
  • Migration tested without data loss

@Eeshu-Yadav Eeshu-Yadav force-pushed the issues/600-replace-jsonfield-clean branch from ae1c2d0 to a9ad394 Compare August 22, 2025 22:20
…ONField

- Replaced jsonfield.JSONField with Django's built-in JSONField in models
- Updated RadiusBatch.user_credentials field
- Updated OrganizationRadiusSettings.sms_meta_data field
- Removed third-party jsonfield dependency from setup.py
- Added migration to handle field type transition
- Updated test migrations to use Django's JSONField
- Ensured backward compatibility and data preservation
- All existing tests pass with the new implementation

Fixes openwisp#600
@Eeshu-Yadav Eeshu-Yadav force-pushed the issues/600-replace-jsonfield-clean branch from a9ad394 to 998b688 Compare August 22, 2025 22:21
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.

[change:radius] Replace thirdparty JSONField with Django built in JSONField
1 participant