Skip to content

Commit a8153d8

Browse files
authored
Merge branch 'main' into fix/uuid-issubclass-typecheck
2 parents 488c11e + 5ec2360 commit a8153d8

25 files changed

Lines changed: 713 additions & 177 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
blank_issues_enabled: false
33
contact_links:
44
- name: Questions
5-
url: https://github.com/aminalaee/sqladmin/discussions
5+
url: https://github.com/smithyhq/sqladmin/discussions
66
about: >
77
The "Discussions" forum is where you want to start. 💖

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ name: Publish
44
on:
55
push:
66
tags:
7-
- '*'
7+
- "*"
88

99
jobs:
1010
publish:
1111
name: "Publish release"
1212
runs-on: "ubuntu-latest"
13+
permissions:
14+
id-token: write
15+
contents: write
16+
attestations: write
1317

1418
steps:
1519
- uses: "actions/checkout@v3"
@@ -19,7 +23,7 @@ jobs:
1923
- name: Install uv
2024
uses: astral-sh/setup-uv@v5
2125
with:
22-
python-version: '3.12'
26+
python-version: "3.12"
2327
- name: "Install dependencies"
2428
run: uv sync --group docs
2529
- name: "Build package & docs"
@@ -30,6 +34,3 @@ jobs:
3034
run: |
3135
make publish
3236
make docs-deploy
33-
env:
34-
UV_PUBLISH_USERNAME: __token__
35-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can contribute in many ways:
99

1010
### Report Bugs
1111

12-
Report bugs at https://github.com/aminalaee/sqladmin/issues.
12+
Report bugs at https://github.com/smithyhq/sqladmin/issues.
1313

1414
If you are reporting a bug, please include:
1515

@@ -35,7 +35,7 @@ articles, and such.
3535

3636
### Submit Feedback
3737

38-
The best way to send feedback is to file an issue at https://github.com/aminalaee/sqladmin.
38+
The best way to send feedback is to file an issue at https://github.com/smithyhq/sqladmin.
3939

4040
If you are proposing a feature:
4141

@@ -107,5 +107,5 @@ Before you submit a pull request, check that it meets these guidelines:
107107
your new functionality into a function with a docstring, and add the
108108
feature to the list in README.md.
109109
3. The pull request should work from Python 3.9 till 3.14. Check
110-
https://github.com/aminalaee/sqladmin/actions
110+
https://github.com/smithyhq/sqladmin/actions
111111
and make sure that the tests pass for all supported Python versions.

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<p align="center">
2-
<a href="https://github.com/aminalaee/sqladmin">
3-
<img width="400px" src="https://raw.githubusercontent.com/aminalaee/sqladmin/main/docs/assets/images/banner.png" alt"SQLAdmin">
2+
<a href="https://github.com/smithyhq/sqladmin">
3+
<img width="400px" src="https://raw.githubusercontent.com/smithyhq/sqladmin/main/docs/assets/images/banner.png" alt"SQLAdmin">
44
</a>
55
</p>
66

77
<p align="center">
8-
<a href="https://github.com/aminalaee/sqladmin/actions">
9-
<img src="https://github.com/aminalaee/sqladmin/workflows/Test%20Suite/badge.svg" alt="Build Status">
8+
<a href="https://github.com/smithyhq/sqladmin/actions">
9+
<img src="https://github.com/smithyhq/sqladmin/workflows/Test%20Suite/badge.svg" alt="Build Status">
1010
</a>
11-
<a href="https://github.com/aminalaee/sqladmin/actions">
12-
<img src="https://github.com/aminalaee/sqladmin/workflows/Publish/badge.svg" alt="Publish Status">
11+
<a href="https://github.com/smithyhq/sqladmin/actions">
12+
<img src="https://github.com/smithyhq/sqladmin/workflows/Publish/badge.svg" alt="Publish Status">
1313
</a>
14-
<a href="https://codecov.io/gh/aminalaee/sqladmin">
15-
<img src="https://codecov.io/gh/aminalaee/sqladmin/branch/main/graph/badge.svg" alt="Coverage">
14+
<a href="https://codecov.io/gh/smithyhq/sqladmin">
15+
<img src="https://codecov.io/gh/smithyhq/sqladmin/branch/main/graph/badge.svg" alt="Coverage">
1616
</a>
1717
<a href="https://pypi.org/project/sqladmin/">
1818
<img src="https://badge.fury.io/py/sqladmin.svg" alt="Package version">
@@ -39,11 +39,9 @@ Main features include:
3939

4040
---
4141

42-
**Documentation**: [https://aminalaee.github.io/sqladmin](https://aminalaee.github.io/sqladmin)
42+
**Documentation**: [https://smithyhq.github.io/sqladmin](https://smithyhq.github.io/sqladmin)
4343

44-
**Source Code**: [https://github.com/aminalaee/sqladmin](https://github.com/aminalaee/sqladmin)
45-
46-
**Online Demo**: [Demo](https://sqladmin-demo.aminalaee.dev/admin/)
44+
**Source Code**: [https://github.com/smithyhq/sqladmin](https://github.com/smithyhq/sqladmin)
4745

4846
---
4947

docs/api_reference/model_view.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- is_visible
2929
- is_accessible
3030
- column_searchable_list
31+
- search_auto_submit
3132
- search_placeholder
3233
- column_sortable_list
3334
- column_default_sort

docs/configurations.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ The options available are:
114114
- `column_exclude_list`: List of columns or column names to be excluded in the list page.
115115
- `column_formatters`: Dictionary of column formatters in the list page.
116116
- `column_searchable_list`: List of columns or column names to be searchable in the list page.
117+
- `search_auto_submit`: Enable or disable automatic search submit while typing in the list page search input. Default is `True`.
117118
- `column_sortable_list`: List of columns or column names to be sortable in the list page.
118119
- `column_default_sort`: Default sorting if no sorting is applied, tuple of (column, is_descending)
119120
or list of the tuple for multiple columns.
@@ -129,6 +130,7 @@ The options available are:
129130
class UserAdmin(ModelView, model=User):
130131
column_list = [User.id, User.name, "address.zip_code"]
131132
column_searchable_list = [User.name]
133+
search_auto_submit = False
132134
column_sortable_list = [User.id]
133135
column_formatters = {User.name: lambda m, a: m.name[:10]}
134136
column_default_sort = [(User.email, True), (User.name, False)]
@@ -185,7 +187,11 @@ The following built in column filters are available. All filters have a default
185187
* AllUniqueStringValuesFilter - A filter for string columns, with the values of all unique values in the column
186188
* StaticValuesFilter - A filter for string columns, with the values of a static list of values. This is similar to AllUniqueStringValuesFilter, but instead of getting the list of possible values from the database, you can provide a static list of values.
187189
* ForeignKeyFilter - A filter for foreign key columns, with the values of all unique values in the foreign key column. To make this filter readable, you need to provide the field name from the foreign model that you want to display as the name of the filter.
188-
* OperationColumnFilter - A flexible filter that automatically detects column types and provides appropriate operations. For string columns, it offers Contains, Equals, StartsWith, and EndsWith operations. For numeric columns (integer, float), it offers Equals, GreaterThan, and LessThan operations. For UUID columns (SQLAlchemy 2.0+), it offers Contains, Equals, and StartsWith operations.
190+
* OperationColumnFilter - A flexible filter that automatically detects column types and provides appropriate operations.
191+
- For string columns, it offers Contains, Equals, StartsWith, and EndsWith operations.
192+
- For numeric columns (integer, float), it offers Equals, GreaterThan, and LessThan operations.
193+
- For date columns (Date, DateTime), it offers Equals, GreaterThan, and LessThan operations.
194+
- For UUID columns (SQLAlchemy 2.0+), it offers Contains, Equals, and StartsWith operations.
189195

190196
Here is an example of how to use BooleanFilter, AllUniqueStringValuesFilter, ForeignKeyFilter, and OperationColumnFilter:
191197

@@ -204,6 +210,7 @@ class User(Base):
204210
salary: Mapped[float] = mapped_column(Float, nullable=False)
205211
description: Mapped[str] = mapped_column(String, nullable=True)
206212
site: Mapped[Optional["Site"]] = relationship(back_populates="users")
213+
created_at: Mapped[datetime.datetime] = mapped_column(server_default=func.now())
207214

208215
class Site(Base):
209216
__tablename__ = "sites"
@@ -215,14 +222,15 @@ class Site(Base):
215222

216223
# Define User Admin View
217224
class UserAdmin(ModelView, model=User):
218-
column_list = ["id", "name", "email", "is_admin", "age"]
225+
column_list = ["id", "name", "email", "is_admin", "age", "created_at"]
219226
column_filters = [
220227
BooleanFilter(User.is_admin),
221228
AllUniqueStringValuesFilter(User.name),
222229
ForeignKeyFilter(User.site_id, Site.name, title="Site"),
223230
# OperationColumnFilter provides dropdown UI with multiple operations
224231
OperationColumnFilter(User.email), # String operations: Contains, Equals, Starts with, Ends with
225232
OperationColumnFilter(User.age), # Numeric operations: Equals, Greater than, Less than
233+
OperationColumnFilter(User.created_at), # DateTime operations: Equals, Greater than, Less than
226234
]
227235
can_create = True
228236
can_edit = True

docs/index.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<p align="center">
2-
<a href="https://github.com/aminalaee/sqladmin">
3-
<img width="400px" src="https://raw.githubusercontent.com/aminalaee/sqladmin/main/docs/assets/images/banner.png" alt"SQLAdmin">
2+
<a href="https://github.com/smithyhq/sqladmin">
3+
<img width="400px" src="https://raw.githubusercontent.com/smithyhq/sqladmin/main/docs/assets/images/banner.png" alt"SQLAdmin">
44
</a>
55
</p>
66

77
<p align="center">
8-
<a href="https://github.com/aminalaee/sqladmin/actions">
9-
<img src="https://github.com/aminalaee/sqladmin/workflows/Test%20Suite/badge.svg" alt="Build Status">
8+
<a href="https://github.com/smithyhq/sqladmin/actions">
9+
<img src="https://github.com/smithyhq/sqladmin/workflows/Test%20Suite/badge.svg" alt="Build Status">
1010
</a>
11-
<a href="https://github.com/aminalaee/sqladmin/actions">
12-
<img src="https://github.com/aminalaee/sqladmin/workflows/Publish/badge.svg" alt="Publish Status">
11+
<a href="https://github.com/smithyhq/sqladmin/actions">
12+
<img src="https://github.com/smithyhq/sqladmin/workflows/Publish/badge.svg" alt="Publish Status">
1313
</a>
14-
<a href="https://codecov.io/gh/aminalaee/sqladmin">
15-
<img src="https://codecov.io/gh/aminalaee/sqladmin/branch/main/graph/badge.svg" alt="Coverage">
14+
<a href="https://codecov.io/gh/smithyhq/sqladmin">
15+
<img src="https://codecov.io/gh/smithyhq/sqladmin/branch/main/graph/badge.svg" alt="Coverage">
1616
</a>
1717
<a href="https://pypi.org/project/sqladmin/">
1818
<img src="https://badge.fury.io/py/sqladmin.svg" alt="Package version">
@@ -39,11 +39,9 @@ Main features include:
3939

4040
---
4141

42-
**Documentation**: [https://aminalaee.github.io/sqladmin](https://aminalaee.github.io/sqladmin)
42+
**Documentation**: [https://smithyhq.github.io/sqladmin](https://smithyhq.github.io/sqladmin)
4343

44-
**Source Code**: [https://github.com/aminalaee/sqladmin](https://github.com/aminalaee/sqladmin)
45-
46-
**Online Demo**: [Demo](https://sqladmin-demo.aminalaee.dev/admin/)
44+
**Source Code**: [https://github.com/smithyhq/sqladmin](https://github.com/smithyhq/sqladmin)
4745

4846
---
4947

docs/working_with_files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Working with Files and Images
22

3-
You can use [fastapi-storages](https://github.com/aminalaee/fastapi-storages) package
3+
You can use [fastapi-storages](https://github.com/smithyhq/fastapi-storages) package
44
to make file management easy in `SQLAdmin`.
55

66
Right now `fastapi-storages` provides two storage backends:
@@ -57,4 +57,4 @@ and displayed in the admin dashboard.
5757

5858
You can replace `FileSystemStorage` with `S3Storage` to upload to S3 or any S3-compatible API.
5959

60-
For complete features and API reference of the `fastapi-storages` you can visit the docs at [https://aminalaee.github.io/fastapi-storages](https://aminalaee.github.io/fastapi-storages).
60+
For complete features and API reference of the `fastapi-storages` you can visit the docs at [https://smithyhq.github.io/fastapi-storages](https://smithyhq.github.io/fastapi-storages).

mkdocs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
site_name: SQLAlchemy Admin
22
site_description: Flexible admin dashboard for SQLAlchemy.
3-
site_url: https://aminalaee.github.io/sqladmin/
3+
site_url: https://smithyhq.github.io/sqladmin/
44

55
theme:
66
name: "material"
@@ -9,8 +9,8 @@ theme:
99
features:
1010
- content.code.copy
1111

12-
repo_name: aminalaee/sqladmin
13-
repo_url: https://github.com/aminalaee/sqladmin
12+
repo_name: smithyhq/sqladmin
13+
repo_url: https://github.com/smithyhq/sqladmin
1414
edit_uri: ""
1515

1616
nav:
@@ -66,8 +66,6 @@ extra:
6666
property: G-MV427T1Z9X
6767
social:
6868
- icon: fontawesome/brands/github
69-
link: https://github.com/aminalaee
70-
- icon: fontawesome/brands/twitter
71-
link: https://twitter.com/aminalaee
69+
link: https://github.com/smithyhq
7270
- icon: fontawesome/brands/linkedin
7371
link: https://www.linkedin.com/in/amin-alaee

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ module-root = ""
88

99
[project]
1010
name = "sqladmin"
11-
version = "0.22.0"
11+
version = "0.24.0"
1212
description = 'SQLAlchemy admin for FastAPI and Starlette'
1313
readme = "README.md"
1414
requires-python = ">=3.9"
1515
license = "BSD-3-Clause"
1616
keywords = ["sqlalchemy", "fastapi", "starlette", "admin"]
17-
authors = [{ name = "Amin Alaee", email = "me@aminalaee.dev" }]
17+
authors = [{ name = "Amin Alaee", email = "mohammadamin.alaee@gmail.com" }]
1818
classifiers = [
1919
"Development Status :: 4 - Beta",
2020
"Programming Language :: Python",
@@ -43,9 +43,9 @@ dependencies = [
4343
full = ["itsdangerous"]
4444

4545
[project.urls]
46-
Documentation = "https://aminalaee.github.io/sqladmin/"
47-
Issues = "https://github.com/aminalaee/sqladmin/issues"
48-
Source = "https://github.com/aminalaee/sqladmin"
46+
Documentation = "https://smithyhq.github.io/sqladmin/"
47+
Issues = "https://github.com/smithyhq/sqladmin/issues"
48+
Source = "https://github.com/smithyhq/sqladmin"
4949

5050

5151
[dependency-groups]
@@ -73,12 +73,12 @@ dev = [
7373
"bandit",
7474
]
7575

76-
lint = ["mypy==1.18.1", "ruff==0.14.10", "types-wtforms>=3.2.1.20250809"]
76+
lint = ["mypy==1.19.1", "ruff==0.15.4", "types-wtforms>=3.2.1.20250809"]
7777

7878
docs = [
79-
"mkdocs-material==9.6.14",
79+
"mkdocs-material==9.7.1",
8080
"mkdocs==1.6.1",
81-
"mkdocstrings[python]==0.26.1",
81+
"mkdocstrings[python]==0.30.1",
8282
]
8383

8484
[tool.mypy]

0 commit comments

Comments
 (0)