Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

[0.13.2] - 2023-02-04

Fixed

  • Remove extra whitespaces from TextAreaField form template (0.13.0 regression) by @jowilf in #494

[0.13.1] - 2023-01-21

Fixed

  • Fixed the StopIteration exception raised in Sqlalchemy ModelView when the primary key is not included in the field list by @jowilf in #482

[0.13.0] - 2023-01-16

Added

  • Enhance AuthMiddleware, introduce @login_not_required decorator and allow_routes, deprecate allow_paths by @jowilf in #474
  • Add a search bar on detail page to search by attributes or values by @hasansezertasan in #461
  • Refactor TinyMCEEditorField: support custom TinyMCE configuration by @hasansezertasan in #380
  • Add support for SQLAlchemy column_property by @jowilf in #408
  • Add support for SQLAlchemy Models with Multiple Primary Keys by @jowilf in #402
  • Adds AdminConfig to override app_title and logo_url in the templates by @hasansezertasan in #374

Fixed

[0.12.2] - 2023-11-13

  • Fixed issue where "Empty" and "Not Empty" filters raised NotImplementedError on SQLAlchemy relationship attributes by @whchi in #394

[0.12.1] - 2023-11-07

  • Fixed a regression caused by #361 where SQLAlchemy models with Mixin Classes raises AttributeError by @hasansezertasan in #385

[0.12.0] - 2023-11-07

Added

  • Add Before and After Hooks for Create, Edit, and Delete Operations by @jowilf in #327
  • Feature: Row actions by @jowilf & @mrharpo in #348 and #302
  • Add Support for Custom Sortable Field Mapping in SQLAlchemy ModelView by @jowilf in #328
Usage
class Post(Base):
    __tablename__ = "post"

    id: Mapped[int] = mapped_column(primary_key=True)
    title: Mapped[str] = mapped_column()
    user_id: Mapped[int] = mapped_column(ForeignKey("user.id"))
    user: Mapped[User] = relationship(back_populates="posts")

class PostView(ModelView):
    sortable_field = ["id", "title", "user"]
    sortable_field_mapping = {
        "user": User.age,  # Sort by the age of the related user
    }
Usage
class MyModelView(ModelView):
    save_state = True

Fixed

  • Fix #347: Detect SQLAlchemy primary key with custom column name by @jowilf in #361

  • Fixed a bug with field access authorization where restricted users could not modify a partial list of fields in an entity by @jowilf in #360

Internals

  • Explicitly export all public functions and classes by @jowilf in #362

[0.11.2] - 2023-08-31

Fixed

  • Bug Fix: Current Enum Value Not Pre-Selected on Edit by @jowilf in #273

[0.11.1] - 2023-07-29

Fixed

  • Bug Fix: Ensure Excluded fields from a RequestAction are not treated by @jowilf in #251

[0.11.0] - 2023-07-26

Added

  • Improve the Authentication Provider to support custom flow such as oauth2/OIDC by @jowilf in #221.

Internals

[0.10.1] - 2023-07-22

Fixed

[0.10.0] - 2023-06-26

Added

  • Added support for Russian language in the web interface by @nessshon in #201
  • i18n: Update message catalogs by @jowilf in #202
  • Support custom response for batch actions by @jowilf in #212

Fixed

  • Fixed #206: Setting add_to_menu=False in CustomView still results in the view being displayed in the menu

[0.9.0] - 2023-05-25

Added

  • Enhance fields conversion logic to support custom converters by @jowilf in #191
  • Add deployment section to documentation by @jowilf in #195

Fixed

  • Blank Edit Form Displayed for IntegerField with Value 0 by @jowilf in #194

[0.8.2] - 2023-05-12

Added

  • Add allow_paths parameter to AuthProvider to allow unauthenticated access to specific paths by @jowilf in #187
  • Allow Unauthenticated Access to js.cookie.min.js by @mixartemev in #183

[0.8.1] - 2023-04-30

Added

  • Update fontawesome to 6.4.0 & add missings webfonts by @jowilf in #176
  • Allow class level configuration for ModelView identity, name & label by @jowilf in #178

[0.8.0] - 2023-04-09

Added

  • Add extension to autovalidate SQLAlchemy data with pydantic by @jowilf in #144
  • Make _extract_fields() method in BaseModelView public and renamed to get_fields_list() by @jowilf in #148
  • Add support for custom object representations in the admin interface with __admin_repr__ and __admin_select2_repr__ by @jowilf in #152. The documentation can be found here

Internals

  • Enhance code quality with additional ruff rules by @jowilf in #159

[0.7.0] - 2023-03-24

Added

Internals

  • Add SQLAlchemy model with Pydantic validation example @jowilf in #125
  • Refactor and format HTML files for better readability by @jowilf in #136

[0.6.0] - 2023-03-12

Added

  • Setup i18n and Add French translations by @jowilf in #74 *

Add TimeZoneField, CountryField, CurrencyField & ArrowField

Usage

class User:
    id: int
    last_name: str
    first_name: str


class UserView(ModelView):
    fields_default_sort = ["last_name", ("first_name", True)]

admin.add_view(UserView(User))

Fixed

  • Fix #69 : Return HTTP_422_UNPROCESSABLE_ENTITY when form data is not valid

Deprecated

  • EnumField.from_enum("status", Status) is deprecated. Use EnumField("status", enum=Status) instead.
  • EnumField.from_choices("language", [('cpp', 'C++'), ('py', 'Python')]) is deprecated. Use EnumField("name", choices=[('cpp', 'C++'), ('py', 'Python')]) instead.

[0.5.5] - 2023-03-06

Fixed

  • Fix #116 : Internal Server Error when login credentials are wrong by @jowilf in #117

[0.5.4] - 2023-03-03

Fixed

  • Fix #99 : Show error message when an error occur on delete action (detail view).

Added

  • Display meaningfully error message when SQLAlchemyError occur during action execution by @jowilf and @dolamroth in #105

[0.5.3] - 2023-02-25

Fixed

  • Fix Bug with SQLAlchemy column converters by @jowilf in #103

[0.5.2] - 2022-12-29

Fixed

[0.5.1] - 2022-12-27

Fixed

  • Fix Bug with sqlalchemy.dialects.postgresql.base.UUID column by @jowilf in #65

[0.5.0] - 2022-12-17

Added

Internals

[0.4.0] - 2022-12-07


Added

  • Custom batch actions by @jowilf in #44
  • Add get_list_query, get_count_query and get_search_query methods to SQLAlchemy backend that can be inherited for customization by @jowilf in #47

Internals

  • Update datatables to 1.13.1
  • Update Search builder UI to fit tabler design

[0.3.2] - 2022-12-02


Fixed

  • Fix Datatables warning when primary key is not included in fields by @jowilf in #23

Docs

  • Add spanish translation for docs/index.md by @rafnixg in #35

Internals

[0.3.1] - 2022-11-22


Fixed

  • Fix Regression on SQLModel backend: Duplicate instances when creating or updating a model with relationships in #23

[0.3.0] - 2022-11-21


Breaking Changes

  • Changes in ModelView definition
class Post:
    id: int
    title: str

admin.add_view(ModelView(Post, icon="fa fa-blog", label = "Blog Posts"))
class Post:
    id: int
    title: str


class PostView(ModelView, model=Post):
    icon = "fa fa-blog"
    label = "Blog Posts"

admin.add_view(PostView)
  • Changes in CustomView definition
admin.add_view(CustomView(label="Home", icon="fa fa-home", path="/home", template_path="home.html"))
class HomeView(CustomView):
    label = "Home"
    icon = "fa fa-home"
    path = "/home"
    template_path = "home.html"

admin.add_view(HomeView)
  • Changes in Link definition
admin.add_view(Link(label="Back to Home", icon="fa fa-home", url="/", target = "_blank"))
class BackToHome(Link):
    label = "Back to Home"
    icon = "fa fa-home"
    url = "/"
    target = "_blank"

These changes are inspired from Flask-admin and are introduced to help reduce code size and keep it simple.

Added

Usage

class MyModelView(ModelView):
    responsive_table = True

Changed

  • Move SQLModel to it own contrib package
  • MongoEngine EmbeddedDocumentField is now converted into CollectionField

Removed

  • Remove PDF from default export_types

[0.2.2] - 2022-09-20


Fixed

  • Null support for EnumField in #17

[0.2.1] - 2022-09-19


Fixed

  • Fix SearchBuilder not working with dates (SQLAlchemy) in #15

[0.2.0] - 2022-09-14


Changed

  • Date & Time input now use Flatpickr in #10

[0.1.1] - 2022-09-09


Added

  • Add ColorField in #7
  • AsyncEngine support for SQLAlchemy in #8