Piccolo

Latest version: v1.22.0

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 21 of 53

0.64.0

Not secure
------

Added initial support for ``ForeignKey`` columns referencing non-primary key
columns. For example:

.. code-block:: python

class Manager(Table):
name = Varchar()
email = Varchar(unique=True)

class Band(Table):
manager = ForeignKey(Manager, target_column=Manager.email)

Thanks to theelderbeever for suggesting this feature, and with help testing.

-------------------------------------------------------------------------------

0.63.1

Not secure
------

Fixed an issue with the ``value_type`` of ``ForeignKey`` columns when
referencing a table with a custom primary key column (such as a ``UUID``).

-------------------------------------------------------------------------------

0.63.0

Not secure
------

Added an ``exclude_imported`` option to ``table_finder``.

.. code-block:: python

APP_CONFIG = AppConfig(
table_classes=table_finder(['music.tables'], exclude_imported=True)
)

It's useful when we want to import ``Table`` subclasses defined within a
module itself, but not imported ones:

.. code-block:: python

tables.py
from piccolo.apps.user.tables import BaseUser excluded
from piccolo.columns.column_types import ForeignKey, Varchar
from piccolo.table import Table


class Musician(Table): included
name = Varchar()
user = ForeignKey(BaseUser)

This was also possible using tags, but was less convenient. Thanks to sinisaos
for reporting this issue.

-------------------------------------------------------------------------------

0.62.3

Not secure
------

Fixed the error message in ``LazyTableReference``.

Fixed a bug with ``create_pydantic_model`` with nested models. For example:

.. code-block:: python

create_pydantic_model(Band, nested=(Band.manager,))

Sometimes Pydantic couldn't uniquely identify the nested models. Thanks to
wmshort and sinisaos for their help with this.

-------------------------------------------------------------------------------

0.62.2

Not secure
------

Added a max password length to the ``BaseUser`` table. By default it's set to
128 characters.

-------------------------------------------------------------------------------

0.62.1

Not secure
------

Fixed a bug with ``Readable`` when it contains lots of joins.

``Readable`` is used to create a user friendly representation of a row in
Piccolo Admin.

-------------------------------------------------------------------------------

Page 21 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.