Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Chapter 10 WORKING
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Flinn authored and Lisa Flinn committed Feb 14, 2020
1 parent 6fcd36b commit 843627b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
Binary file modified rango/__pycache__/views.cpython-37.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions rango/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def index(request):
context_dict['pages'] = page_list

visitor_cookie_handler(request)
context_dict['visits'] = request.session['visits']

response = render(request, 'rango/index.html', context=context_dict)
return response

Expand All @@ -32,7 +32,7 @@ def about(request):
print(request.user)
visitor_cookie_handler(request)
context_dict ={}
context_dict['visits'] = requestion.session['visits']
context_dict['visits'] = request.session['visits']
return render(request, 'rango/about.html', context_dict)

def show_category(request, category_name_slug):
Expand Down
Binary file modified tango_with_django_project/__pycache__/settings.cpython-37.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions tango_with_django_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@

LOGIN_URL= 'rango:login'

SESSION_EXPIRE_AT_BROWSER_CLOSE = True
2 changes: 1 addition & 1 deletion templates/rango/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>Rango says...</h1>
<strong>This tutorial has been put together by Lisa Flinn AKA RogueTea </strong><br />
</div>
<div>
Visits:{{ visits }}
<p>Visits: {{ visits }}</p>
<a href="/rango/">Index</a><br />
<img src="{% static 'images/rango.jpg' %}" alt="Picture of Rango" />

Expand Down
1 change: 1 addition & 0 deletions templates/rango/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ <h2>Most Viewed Pages</h2>
</div>
<div>
<img src="{% static 'images/rango.jpg' %}" alt= "Picture of Rango" />

</div>
{% endblock %}

0 comments on commit 843627b

Please sign in to comment.