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:
@@ -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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Django settings for running djarea's test suite standalone.
|
||||
Django settings for running mizan's test suite standalone.
|
||||
|
||||
Usage:
|
||||
cd django/
|
||||
@@ -22,7 +22,7 @@ INSTALLED_APPS = [
|
||||
"django.contrib.auth",
|
||||
"django.contrib.contenttypes",
|
||||
"django.contrib.sessions",
|
||||
"djarea",
|
||||
"mizan",
|
||||
"tests",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
path("api/djarea/", include("djarea.urls")),
|
||||
path("api/mizan/", include("mizan.urls")),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user