-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
Checklist
- There are no similar issues or pull requests for this yet.
Is your feature related to a problem? Please describe.
So, I have Vacancy table:
from enum import Enum
from sqlalchemy.orm import DeclarativeBase
class VacancyStatus(str, Enum):
DRAFT = 'draft'
ACTIVE = 'active'
INACTIVE = 'inactive'
ARCHIVED = 'archived'
DELETED = 'deleted'
PAUSED = 'paused'
EXPIRED = 'expired'
CLOSED = 'closed'
class Vacancy(DeclarativeBase):
__tablename__ = 'company_vacancy'
id: Mapped[int]
status: Mapped[VacancyStatus] = mapped_column(String, default=VacancyStatus.ACTIVE)I have many unverified draft vacancies, which are later processed one by one. As they are many, I want to have two views in admin: Vacancy and DraftVacancy. I planned to separate with overriding list_query function, however, as it is the same class, I get the same identity, so URL is the same for both views.
Describe the solution you would like.
Enable to indicate identity as parameter. If not given, use slugify_class_name(obj.__class__.__name__).
Describe alternatives you considered
I had to create another class to bypass.
class DraftVacancy(Vacancy):
passAnd use a new view for this "new" class"
Additional context
SQLAdmin: v0.21.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels