[Fixed]-Django add field to auth_user

1👍

users_model doesn’t reference NewUserModel, it references User. You need to access the related model in your template like so:

{% for item in users_model %}
        <tr>
          <td><a href="{% url 'profile' item.id %}">{{ item.username }}</a></td>
          <td>{{ item.newusermodel.posts }}</td>
          <td></td>
          <td></td>
        </tr>
        {% endfor %}

Leave a comment