Rename djarea to mizan and fix React casing conventions

Rename the package from djarea to mizan across the entire codebase —
Python package, React library, generators, tests, and examples. Fix
JSX/hook casing (MizanProvider, useMizan, etc.) that broke when the
original PascalCase names were lowercased during the rename.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 20:01:03 -04:00
parent bf837e598b
commit c866142770
118 changed files with 1778 additions and 1433 deletions

View File

@@ -1,4 +1,8 @@
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from django.contrib.auth.models import (
AbstractBaseUser,
BaseUserManager,
PermissionsMixin,
)
from django.db import models
@@ -23,7 +27,7 @@ class EmailUserManager(BaseUserManager):
class EmailUser(AbstractBaseUser, PermissionsMixin):
"""Minimal user model with email as USERNAME_FIELD.
Matches the calling convention used in djarea's test suite:
Matches the calling convention used in mizan's test suite:
User.objects.create_user(email="...", password="...", is_staff=True)
"""
@@ -90,7 +94,11 @@ class Book(TimestampMixin):
is_published = models.BooleanField(default=False)
author = models.ForeignKey(Author, on_delete=models.CASCADE, related_name="books")
editor = models.ForeignKey(
Author, on_delete=models.SET_NULL, null=True, blank=True, related_name="edited_books",
Author,
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name="edited_books",
)
tags = models.ManyToManyField(Tag, blank=True, related_name="books")
@@ -112,7 +120,9 @@ class Chapter(TimestampMixin):
class Section(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
chapter = models.ForeignKey(Chapter, on_delete=models.CASCADE, related_name="sections")
chapter = models.ForeignKey(
Chapter, on_delete=models.CASCADE, related_name="sections"
)
heading = models.CharField(max_length=300)
body = models.TextField(default="")
position = models.IntegerField(default=0)