Skip to content

Commit

Permalink
added adopt page
Browse files Browse the repository at this point in the history
  • Loading branch information
sayard committed Jun 11, 2017
1 parent d3ab076 commit e56e4aa
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 48 deletions.
105 changes: 58 additions & 47 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified animal_shelter/animal_list/__pycache__/views.cpython-36.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion animal_shelter/animal_list/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ def adopt(request, animal_id):
animal = Animal.objects.get(pk=animal_id)
animal.is_visible = False
animal.save()
return render(request, 'home_page/index.html')
return render(request, 'home_page/adopt.html', {'animal': animal})
Binary file modified animal_shelter/db.sqlite3
Binary file not shown.
17 changes: 17 additions & 0 deletions animal_shelter/home_page/templates/home_page/adopt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "home_page/page_template.html" %}
{% block login_status %}

{% if user.is_authenticated %}
<li><a href='/logout/'>Log out</a></li>
{% else %}
<li><a href='/login/'>Log in</a></li>
<li><a href='/register/'>Register</a></li>
{% endif %}

{% endblock %}
{% block content %}

<h2>You have successfully marked {{ animal.name }} for adoption</h2>
<h3>We'll contact you shortly</h3>

{% endblock %}

0 comments on commit e56e4aa

Please sign in to comment.