Person CRUD working

This commit is contained in:
tomtom5152
2014-10-31 01:12:59 +00:00
parent f4e23e6e5b
commit 74bc6826ea
6 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
{% extends request.is_ajax|yesno:"base_ajax.html,base.html" %}
{% load widget_tweaks %}
{% block title %}{{ object.name }}{% endblock %}
{% block content %}
<div class="col-sm-10 col-sm-offset-1">
<h3>{{ object.name }}</h3>
<div class="pull-right">
<a href="{% url 'person_update' object.pk %}" class="btn btn-primary">Edit <span class="glyphicon glyphicon-pencil"></span></a>
</div>
<div class="row col-sm-12">
<div class="col-sm-6">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd>{{ object.name }}</dd>
<dt>Phone</dt>
<dd><a href="tel:{{ object.phone }}">{{ object.phone }}</a></dd>
<dt>Email</dt>
<dd><a href="mailto:{{ object.email }}">{{ object.email }}</a></dd>
<dt>Address</dt>
<dd>{{ object.address|linebreaksbr }}</dd>
</dl>
</div>
</div>
</div>
{% endblock %}

View File

@@ -1,7 +1,7 @@
{% extends request.is_ajax|yesno:'base_ajax.html,base.html' %}
{% load widget_tweaks %}
{% block title %}Add Person{% endblock %}
{% block title %}{% if object.pk %}Edit {{ object.name }}{% else %}Add Person{% endif %}{% endblock %}
{% block content %}
<div class="col-sm-offset-1 col-sm-10">