Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
python-version: '3.13'
cache: "poetry"
- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ clean:
.PHONY: fix
fix:
@echo "Run ruff"
@exec poetry run ruff --fix fastadmin tests docs examples
@exec poetry run ruff check --fix fastadmin tests docs examples
@echo "Run isort"
@exec poetry run isort fastadmin tests docs examples
@echo "Run black"
Expand All @@ -21,7 +21,7 @@ fix:
.PHONY: lint
lint:
@echo "Run ruff"
@exec poetry run ruff fastadmin tests docs examples
@exec poetry run ruff check fastadmin tests docs examples
@echo "Run isort"
@exec poetry run isort --check-only fastadmin tests docs examples
@echo "Run black"
Expand All @@ -34,7 +34,7 @@ lint:
# -n auto : fix django
.PHONY: test
test:
@exec poetry run pytest --cov=fastadmin --cov-report=term-missing --cov-report=xml --cov-fail-under=80 -s tests
@exec poetry run pytest -n 1 --cov=fastadmin --cov-report=term-missing --cov-report=xml --cov-fail-under=80 -s tests
@exec make -C frontend test

.PHONY: kill
Expand Down
16 changes: 14 additions & 2 deletions docs/build.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import inspect
import os
import re
import sys
from datetime import datetime, timezone
from pathlib import Path

from django.apps import apps
from django.apps.registry import Apps
from htmlmin import minify
from jinja2 import Environment, FileSystemLoader, select_autoescape

from fastadmin.settings import ROOT_DIR, Settings
Expand All @@ -18,6 +18,12 @@
Apps.check_apps_ready = lambda x: None


def html_minify(html: str) -> str:
html = re.sub(r">\s+<", "><", html)
html = re.sub(r"\s+", " ", html)
return html.strip()


class App:
label = "app"

Expand All @@ -39,6 +45,12 @@ def read_cls_docstring(cls):

def get_versions():
return [
{
"version": "0.2.20",
"changes": [
"Fix for _id fields. Bump packages for backend and frontend.",
],
},
{
"version": "0.2.19",
"changes": [
Expand Down Expand Up @@ -648,7 +660,7 @@ def build():
index_template = env.get_template("templates/index.html")
index_html = index_template.render(**context)
with Path.open(Path("index.html"), "w") as fh:
fh.write(minify(index_html))
fh.write(html_minify(index_html))

readme_template = env.get_template("templates/readme.md")
readme_md = readme_template.render(**context)
Expand Down
1,315 changes: 1 addition & 1,314 deletions docs/index.html

Large diffs are not rendered by default.

47 changes: 28 additions & 19 deletions examples/django_djangoorm/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/django_djangoorm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
django = "^5.1"
fastadmin = {"version" = "^0.2.15", extras = ["django"]}
django = "^5.2"
fastadmin = {"version" = "^0.2.19", extras = ["django"]}

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading