{% extends "base_view.html" %} {% load widget_tweaks %} {% load bird_tags %} {% block title %} meliza-lab : nest check {% endblock %} {% block content %}

Nest Check


{% if nest_formset.non_form_errors %}
Form Errors:
{% endif %}

Today's nest check

Instructions: This form is for entering data from the daily nest check. Count the eggs and chicks in each nest, update the values in the last column of the table, then click Submit. Note: if chicks die, you need to add events for the specific animals, then come back and complete the nest check. You may enter more than one nest check per day.

{% csrf_token %} {{ nest_formset.management_form }} {% if nest_formset.management_form.errors %}
Management form errors: {{ nest_formset.management_form.errors }}
{% endif %} {% for date in dates %} {% endfor %} {% for pairing, form in nest_data %} {% for day in pairing.counts %} {% endfor %} {% endfor %}
room location pair established{{ date|date:"D m/d/Y" }}Nest Check
{{ pairing.location.room|default_if_none:"" }} {{ pairing.location.name }} {{ pairing.pair.short_name }} {{ pairing.pair.began_on|date:"m/d/Y" }} {{ day|count_summary }} {% if form.non_field_errors %}
Errors:
    {% for error in form.non_field_errors %}
  • {{ error }}
  • {% endfor %}
{% endif %} {{ form.pairing }} {{ form.location }}
{% render_field form.eggs class+="form-control" %} {% if form.eggs.errors %} {% for error in form.eggs.errors %}{{ error }}{% endfor %} {% endif %}
{% render_field form.chicks class+="form-control" %} {% if form.chicks.errors %} {% for error in form.chicks.errors %}{{ error }}{% endfor %} {% endif %}

Clicking Submit will take you to a new page where you can confirm the eggs and birds that will be added to and/or removed from the database.

Recent nest checks

{% for check in nest_checks %} {% endfor %}
Date User Comments
{{ check.datetime|date:"D m/d/Y" }} {{ check.entered_by }} {{ check.comments }}
{% endblock %} {% if debug %}

Debug: Form Validation State

Click to expand debugging info
Individual Form Status:
{% for form in nest_formset %}
Form {{ forloop.counter0 }}: {% if form.errors %} ERRORS: {{ form.errors }} {% else %} No errors {% endif %}
{% endfor %}
{% endif %}