• Sign in

Administrator / django-contrib-comments · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Forks
  • Network
  • django-contrib-comments
  • django_comments
  • migrations
  • 0007_comment_metadata.py
  • [Add] Add JSONField and JsonFormWidget for handling JSON data in comments ...
      aeb24f7c
    - Introduced JSONField to store JSON metadata in the Comment model.
    - Added JsonFormWidget for rendering a JSON editor in forms.
    - Created a migration to add the new metadata field to the Comment model.
    - Included a template for the JSON editor widget.
    Alejandro Ortiz authored
    2026-02-17 10:01:41 -0500  
    Browse Files »
0007_comment_metadata.py 480 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from django.db import migrations
import django_comments.fields


class Migration(migrations.Migration):

    dependencies = [
        ('django_comments', '0006_auto_20200830_1322'),
    ]

    operations = [
        migrations.AddField(
            model_name='comment',
            name='metadata',
            field=django_comments.fields.JSONField(
                blank=True,
                null=True,
                verbose_name='Metadata',
            ),
        ),
    ]