Package: django-formulaic
Django FormulaicDjango Formulaic allows Django Admin users to create custom forms.  The generated forms
are rendered using an extension of Django's Form class.  Form submission data is
collected by the app and accessible via its admin interface.The app was originally developed for internal use.  We hope others will find it useful,
but it definitely lacks polish at this point in its development.ImplementationConfiguration# settings.pyINSTALLED_APPS=[# ...'django_filters','rest_framework','formulaic','admin_ordering',# ...]# urls.pyurlpatterns=[# ...path('formulaic/',include('formulaic.urls')),path('admin/',admin.site.urls),]# settings.pyFORMULAIC_EXPORT_STORAGE_LOCATION='/data/shared/assets/formulaic_exports'Example UsageTheCustomFormclass extends Django'sforms.Formclass, so you can expect a lot of the same behavior you see in Django's documentation.# urls.pyfromdjango.contribimportadminfromdjango.urlsimportpath,includefromformulaic_demoimportviewsasfd_viewsurlpatterns=[path('form-test/',fd_views.test_formulaic_form),path('form-test/completed/',fd_views.test_formulaic_form_complete,name='form-complete'),path('formulaic/',include('formulaic.urls')),path('admin/',admin.site.urls),]# formulaic_demo/views.pyfromdjango.shortcutsimportredirect,renderfromformulaic.formsimportCustomFormfromformulaic.modelsimportFormdeftest_formulaic_form(request):formulaic_form=Form.objects.get(slug='robot-form')ifrequest.method=='POST':form=CustomForm(request.POST,request=request,# page-specific name for form. will be stored with each submission in the# `source` field.instance_id='form-page-a',form=formulaic_form)ifform.is_valid():formulaic_form.create_submission(form.cleaned_data,source=form.instance_id,metadata={'extra-data-1':'some data','extra-data-2':'more data',})returnredirect('form-complete')elifnotform.is_valid():errors=form.errors# raise Exception('Not valid {}'.format(form.errors))returnrender(request,'formulaic_demo/formulaic-form.html',{'form':form})else:form=CustomForm(request=request,# page-specific name for form. will be stored with each submission in the# `source` field.instance_id='form-page-a',form=formulaic_form)returnrender(request,'formulaic_demo/formulaic-form.html',{'form':form})deftest_formulaic_form_complete(request):formulaic_form=Form.objects.get(slug='robot-form')returnrender(request,'formulaic_demo/formulaic-form-complete.html',{'message':formulaic_form.success_message,})<!-- templates/formulaic_demo/formulaic-form.html --><!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><title>Test Formulaic Form</title><scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script></head><body>{{ form }}</body></html><!-- templates/formulaic_demoformulaic-form-complete.html --><!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><title>Test Formulaic Form</title></head><body><p>{{ message }}</p></body></html>DependenciesPythonDjango 3.1 [wip: expanding to a wider range]Python 3.8 [wip: expanding to a wider range]django-rest-framework 3.11.2 [wip: any breaking changes in 4.x?]django-filter 0.9.2nameparser 0.3.16pyzipcode 2.0.0us 0.9.1tzlocal 1.2.2We would like to phase these out or make them optionalbeautifulsoup4 4.4.1raven 6.10.0django-ckeditor 5.9.0JavaScriptjQuerymust be included (for now) for the public-facing forms.The admin interface was built mostly usingEmberJS.  You'll find setup instructions in theREADME.mdat the root of that project:/formulaic/static/admin/ember-formulaic. This should only be important if you wish to make changes to the admin.LicenseFormulaic is licensed under the MIT License.  View theLICENSEfile in the root directory for more information.