{% extends 'base.html' %} {% load static %} {% load bootstrap4 %} {% load base_extras %} {% block head-extra %} {% endblock %} {% block content %} {% if root %}

{{root}} population script

You can copy and fill the below script to insert data into the database.

Info
  • The get_or_create method asks the database if this entry already exists. If not the entry is written to the databse. Alternatives are, e.g., object instanciation (no write to the database), create or get. See also the Django docs.
  • Optional fields can be left out.
  • ForeignKeys are python objects. For convienince this script creates objects in the right order and you just have to include them at the approriate place (indicated by their name).
  • Instead of querying the object by their columns, you can also query existing ids (see the Django docs).
{% render_tree tree root %}
{% else %}

Something went wrong — please contact the admins

{% endif %} {% endblock %}