I want the events.html template to format the string somehow, but I do not know how I would do that. The way I have it below is how I would think it should work, but it doesn't.
events.html
{% extends "base.html" %}
{% block content %}
{% for object in objects %}
<h1>{{object.name}}</h1>
<p>When: {{ "It will take place in the year %s and the month %s" % (object.when.year, object.when.month) }}</p>
{% endfor %}
{% endblock %}
views.py
from django.template.response import TemplateResponse
import pdb
from events.models import Event
def home(request):
objects = Event.objects.all()
return TemplateResponse(request, 'events.html', {'objects': objects});
object.when.yearandobject.where.monthboth integers?