Skip to content

Typo on page 275 & 276 #11

@mdvsh

Description

@mdvsh

Hi,
As I was reading and implementing the book, I noticed a small typo on pages 275 and 276 (images are attached).
We want to display the list of users registered with rango and therefore in list_profiles.html write

...
<div class="container">
<div class="row">
{% if user_profile_list %}
<div class="panel-body">
<div class="list-group">
{% for list_user in user_profile_list %}
...

But on the next page, while creating a view for it in views.py , the code in the book adds the profiles under the key 'userprofile_list' instead of 'user_profile_list.

class ListProfilesView(View):
    @method_decorator(login_required)
    def get(self, request):
        profiles = UserProfile.objects.all()
        return render(request, 'rango/list_profiles.html', {'userprofile_list': profiles})

This leads to an error. I hope you fix it.
P.S: The book has been great. Love from India!

Screenshots of the book

  1. Page 275
    image
  2. Page 276
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions