Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo on page 275 & 276 #11

Open
mdvsh opened this issue Mar 5, 2020 · 0 comments
Open

Typo on page 275 & 276 #11

mdvsh opened this issue Mar 5, 2020 · 0 comments

Comments

@mdvsh
Copy link

mdvsh commented Mar 5, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant