Skip to content
Snippets Groups Projects
Verified Commit 9d866ef4 authored by Nik | Klampfradler's avatar Nik | Klampfradler Committed by Nik | Klampfradler
Browse files

Hide JSON field from forms and ModelAdmin by default

parent 7083b335
No related branches found
No related tags found
1 merge request!129Let model extensions define new fields
Pipeline #688 failed
...@@ -43,8 +43,8 @@ class ExtensibleModel(models.Model): ...@@ -43,8 +43,8 @@ class ExtensibleModel(models.Model):
- Dominik George <dominik.george@teckids.org> - Dominik George <dominik.george@teckids.org>
""" """
extended_data = JSONField(default=dict) extended_data = JSONField(default=dict, editable=False)
@classmethod @classmethod
def _safe_add(cls, obj: Any, name: Optional[str]) -> None: def _safe_add(cls, obj: Any, name: Optional[str]) -> None:
# Decide the name for the attribute # Decide the name for the attribute
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment