mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-03 09:25:42 +10:00
This commit completes the simplification of the ID system by: - Removing the ABID (ArchiveBox ID) system entirely - Removing the base_models/abid.py file - Removing KVTag model in favor of the existing Tag model in core/models.py - Simplifying all models to use standard UUIDv7 primary keys - Removing ABID-related admin functionality - Cleaning up commented-out ABID code from views and statemachines - Deleting migration files for ABID field removal (no longer needed) All models now use simple UUIDv7 ids via `id = models.UUIDField(primary_key=True, default=uuid7)` Note: Old migrations containing ABID references are preserved for database migration history compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
18 lines
594 B
Python
18 lines
594 B
Python
"""Base admin classes for models using UUIDv7."""
|
|
|
|
__package__ = 'archivebox.base_models'
|
|
|
|
from django.contrib import admin
|
|
from django_object_actions import DjangoObjectActions
|
|
|
|
|
|
class BaseModelAdmin(DjangoObjectActions, admin.ModelAdmin):
|
|
list_display = ('id', 'created_at', 'created_by')
|
|
readonly_fields = ('id', 'created_at', 'modified_at')
|
|
|
|
def get_form(self, request, obj=None, **kwargs):
|
|
form = super().get_form(request, obj, **kwargs)
|
|
if 'created_by' in form.base_fields:
|
|
form.base_fields['created_by'].initial = request.user
|
|
return form
|