Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsdudakov committed Mar 21, 2024
1 parent 3c19a11 commit c08cd05
Show file tree
Hide file tree
Showing 96 changed files with 6,180 additions and 13,136 deletions.
31 changes: 0 additions & 31 deletions .pre-commit-config.yaml

This file was deleted.

31 changes: 8 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fix:
@echo "Run black"
@exec poetry run black fastadmin tests examples docs
@echo "Run mypy"
@exec poetry run mypy -p fastadmin -p tests -p examples -p docs
@exec poetry run mypy -p fastadmin -p examples -p docs
@echo "Run frontend linters"
@exec make -C frontend fix

Expand All @@ -27,14 +27,14 @@ lint:
@echo "Run black"
@exec poetry run black --check --diff fastadmin tests examples docs
@echo "Run mypy"
@exec poetry run mypy -p fastadmin -p tests -p examples -p docs
@exec poetry run mypy -p fastadmin -p examples -p docs
@echo "Run frontend linters"
@exec make -C frontend lint

.PHONY: test
test:
@exec poetry run python generate_db.py
@exec env ADMIN_ENV_FILE=example.env poetry run pytest --cov=fastadmin --cov-report=term-missing --cov-report=xml --cov-fail-under=90 -s tests
@exec env ADMIN_ENV_FILE=example.env poetry run pytest --cov=fastadmin --cov-report=term-missing --cov-report=xml --cov-fail-under=90 -s tests -x
@exec make -C frontend test

.PHONY: kill
Expand All @@ -44,45 +44,30 @@ kill:

.PHONY: collectstatic
collectstatic:
@exec rm -rf ./fastadmin/static/js
@exec rm -rf ./fastadmin/static/css
@exec cp -rf ./frontend/build/static/js/ ./fastadmin/static/js/
@exec cp -rf ./frontend/build/static/css/ ./fastadmin/static/css/
@exec mv fastadmin/static/js/main*.js fastadmin/static/js/main.min.js
@exec mv fastadmin/static/css/main*.css fastadmin/static/css/main.min.css
@exec rm fastadmin/static/js/*.txt
@exec rm -rf ./fastadmin/static/*.js
@exec rm -rf ./fastadmin/static/*.css
@exec cp -rf ./frontend/dist/assets/index-*.js ./fastadmin/static/main.min.js
@exec cp -rf ./frontend/dist/assets/index-*.css ./fastadmin/static/main.min.css

.PHONY: install
install:
@exec pip install poetry
@exec poetry install --all-extras
@exec make -C frontend install


.PHONY: docs
docs:
@exec make -C docs build


.PHONY: build
build:
@exec make docs
@exec make -C frontend build
@exec make collectstatic

.PHONY: pre-commit-install
pre-commit-install:
@exec poetry run pip install pre-commit
@exec poetry run pre-commit install

.PHONY: pre-commit
pre-commit:
@exec poetry run pre-commit run --all-files

.PHONY: push
pre-push:
@exec make fix
@exec make lint
@exec make pre-commit-install
@exec make pre-commit
@exec make docs
@exec make build
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

## Introduction


<a href='https://github.com/vsdudakov/fastadmin' target='_blank'>FastAdmin</a> is an easy-to-use Admin Dashboard App for FastAPI/Django/Flask inspired by Django Admin.


Expand All @@ -38,7 +38,7 @@




FastAdmin was built with relations in mind and admiration for the excellent and popular Django Admin. It's engraved in its design that you may configure your admin dashboard for FastAPI/Django/Flask easiest way.


Expand All @@ -54,7 +54,7 @@ FastAdmin was built with relations in mind and admiration for the excellent and




FastAdmin is designed to be minimalistic, functional and yet familiar.


Expand All @@ -76,7 +76,7 @@ FastAdmin is designed to be minimalistic, functional and yet familiar.

## Getting Started





Expand All @@ -96,7 +96,7 @@ If you have any questions that are beyond the scope of the documentation, Please

### Installation




Follow the steps below to setup FastAdmin:
Expand All @@ -112,7 +112,7 @@ Follow the steps below to setup FastAdmin:




Install the package using pip:


Expand All @@ -128,7 +128,7 @@ Install the package using pip:







Expand All @@ -144,7 +144,7 @@ Note: For zsh and macos use: <code>pip install fastadmin[fastapi,django]</code>







Expand All @@ -170,7 +170,7 @@ pip install fastadmin[flask,sqlalchemy] # for flask with sqlalchemy




Install the package using poetry:


Expand All @@ -186,7 +186,7 @@ Install the package using poetry:







Expand All @@ -212,7 +212,7 @@ poetry add 'fastadmin[flask,sqlalchemy]' # for flask with sqlalchemy




Configure required settings using virtual environment variables:


Expand All @@ -228,7 +228,7 @@ Configure required settings using virtual environment variables:







Expand All @@ -244,7 +244,7 @@ Note: You can add these variables to .env and use python-dotenv to load them. Se







Expand All @@ -269,7 +269,7 @@ export ADMIN_SECRET_KEY=secret_key

### Quick Tutorial




Setup FastAdmin for a framework
Expand All @@ -285,7 +285,7 @@ Setup FastAdmin for a framework







Expand Down Expand Up @@ -389,7 +389,7 @@ app.register_blueprint(admin_app, url_prefix="/admin")






Register ORM models
Expand All @@ -405,7 +405,7 @@ Register ORM models







Expand Down Expand Up @@ -678,4 +678,4 @@ class UserAdmin(PonyORMModelAdmin):
See full documentation [here](https://vsdudakov.github.io/fastadmin).

## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/vsdudakov/fastadmin/blob/main/LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](https://github.com/vsdudakov/fastadmin/blob/main/LICENSE) file for details.
6 changes: 6 additions & 0 deletions docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def get_versions():
"Added PasswordInput widget type.",
],
},
{
"version": "0.2.0",
"changes": [
"Update packages. Use vite instead obsolete react-scripts.",
],
},
]


Expand Down
Loading

0 comments on commit c08cd05

Please sign in to comment.