Code Yellow backend framework for SPA webapps with REST-like API.
This framework is a work-in-progress. There is no complete documentation yet. We are using it for a couple of projects and fine-tuning it.
There are two ways to run the tests:
./setup.py test
(requires you to have python3 and postgres installed)docker-compose run binder ./setup.py test
docker-compose run db psql -h db -U postgres
.docker-compose rm
. The database will be created during the setup in tests/__init__.py
.The tests are set up in such a way that there is no need to keep migration files. The setup procedure in tests/__init__.py
handles the preparation of the database by directly calling some build-in Django commands.
To only run a selection of the tests, use the -s
flag like ./setup.py test -s tests.test_some_specific_test
.
MySQL is supported, but only with the goal to replace it with PostgreSQL. This means it has a few limitations:
where
filtering on with
relations is not supported.with
or the ids are big, be sure to increase GROUP_CONCAT
max string length by:DATABASES = {
'default': {
'OPTIONS': {
'init_command': 'SET SESSION group_concat_max_len = 1000000',
},
},
}