A typescript code generator for Django Rest Framework.
Project description
django-rest-tsg
A typescript code generator for Django Rest Framework.
Usage
Install using pip
$ pip install django_rest_tsg
Put a tsgconfig.py file with build tasks into your django project’s root.
from django.conf import settings
from django_rest_tsg.build import build
BUILD_DIR = settings.BASE_DIR / 'app/src/core'
BUILD_TASKS = [
build(Foo),
build(BarSerializer, 'app/src/app/core', {'alias': 'Foobar'}),
]
Add django_rest_tsg to your INSTALLED_APPS.
INSTALLED_APPS = [
...
'django_rest_tsg'
]
Run buildtypescript command on manage.py.
$ python manage.py buildtypescript
Or you can switch to another place.
$ python manage.py buildtypescript --build-dir /somewhere/you/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_rest_tsg-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 819310876392a1a581fac07a2bbf8fa68bb750c5bf39b80457ded4fdd6fb6c45 |
|
MD5 | b4ea9c87e412cf220d519648b02044b2 |
|
BLAKE2b-256 | f408c8980d614f859f4fed5c3fd1086cb7a70f551de50d3f937f278b263593c1 |