Metadata-Version: 2.4
Name: django-binder
Version: 2.0.0
Summary: Code Yellow backend framework for SPA webapps with REST-like API.
Home-page: https://github.com/CodeYellowBV/django-binder
Author: Marcel Moreaux
Author-email: marcel@codeyellow.nl
License: MIT License
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 5.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django<6.0,>=3.0
Requires-Dist: Pillow>=3.2.0
Requires-Dist: django-request-id>=1.0.0
Requires-Dist: requests>=2.13.0
Requires-Dist: pika==1.3.2
Provides-Extra: test
Requires-Dist: django-relativedelta>=2.0.0; extra == "test"
Requires-Dist: django-hijack>=2.1.10; extra == "test"
Requires-Dist: psycopg2>=2.7; extra == "test"
Requires-Dist: openpyxl>=3.0.0; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# Django-Binder

[![Build Status](https://travis-ci.org/CodeYellowBV/django-binder.svg?branch=master)](https://travis-ci.org/CodeYellowBV/django-binder)
[![codecov](https://codecov.io/gh/CodeYellowBV/django-binder/branch/master/graph/badge.svg)](https://codecov.io/gh/CodeYellowBV/django-binder)

Code Yellow backend framework for SPA webapps with REST-like API.

## Running the tests

- Run with `./test`
- Access the test database directly by with `docker compose run --rm db psql -h db -U postgres`.
- It may be possible to recreate the test database (for example when you added/changed models). One way of achieving this is to just remove all the docker images that were build `docker compose rm` or `docker compose down db binder`. 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 `-k` flag like `./test -k tests.test_some_specific_test`.

## MySQL support

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.
- Only integer primary keys are supported.
- When fetching large number of records using `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',
        },
	},
}
```
