Install & configure

On this page it is explained how to configure your environment and your django app to start using pyforms.


The instructions on this page assumes you know how the Django framework works.

Configure the environment

  • Install Pyforms using pip.

pip install pyforms-web

Configure a django project

Execute the next command in the terminal to start a Django project.

django-admin startproject <project-name>

Edit the django project file to include the next configurations.



Edit the django project file to include the next urls configurations.

from django.conf    import settings
from django.contrib import admin
from django.urls    import include, path

urlpatterns = [
    path('pyforms/',  include('pyforms_web.web.urls') ),
    path('',          include('orquestra.urls')       ),

if settings.DEBUG:
    from django.conf.urls.static import static
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

Create a pyforms settings file

In the django project root folder (same folder of the file) create the file with the next content.

SETTINGS_PRIORITY = 0 # Will define this settings file as priority. Will override all the settings with lower priority.
PYFORMS_MODE = 'WEB' # Will configure pyforms to run as WEB mode.

Run the project

cd <project-name>
python3 migrate
python3 runserver

Access to http://localhost:8000



Configure django-allauth

django-allauth is a reusable Django app that allows for both local and social authentication, with flows that just work.

To make it work with Orquestra follow the instructions described @django-allauth documentation.

Typical django-allauth configuration

pip install django-allauth

Add the next configuration to your Django project setttings.




LOGIN_URL = '/accounts/login/'

Edit the file to add the next code.

from django.conf.urls import url

urlpatterns = [
    url(r'^accounts/', include('allauth.urls')),

Add the next configuration to the file to configure orquestra to require always authentication before accessing the applications.



Do not forget to apply the db migrations to your project.

Initialize allauth configuration by adding a new register to the sites.Site model, using the next command.

python loaddata conf-allauth-site