I am trying pass a new variable into a template within django-registration. Here is the code I have —
# in the template:
<table>
{% for user in user_list %}
<tr>
<td>{{ user.username }}</td>
</tr>
{% endfor %}
<table>
Where would I put the following user_list definition?
from django.contrib.auth.models import User
'user_list':User.objects.all()
you can append a new method to TEMPLATE_CONTEXT_PROCESSORS in settings.py, e.g.
and then in your
yourcontextfile.pywriteyourcontextmethodlike this: