A package to help bridge the gap between Django's Forms and VueFormGenerator's Schemas using DjangoRestFramework.
The full documentation is at https://django-vueformgenerator.readthedocs.org.
Install Django-VueFormGenerator:
pip install django-vueformgenerator
Then use it in a project:
from django_vueformgenerator.schema import Schema from django import forms import json class TestForm(forms.Form): title = forms.CharField(max_length=128) content = forms.TextField(max_length=1280) form = TestForm() # or TestForm(data={'title':'My Title'}) schema = Schema().render(form) print(json.dumps(schema))
- TODO
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install -r requirements_test.txt (myenv) $ python runtests.py
Tools used in rendering this package: