Show Delivery order status in Sales Order Page

Anybody know how to show the “delivery Status” in “My Order” web page?
I try to write/edit the Order.html page as below:

{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
<div class="row">
    <div class="col-xs-6">
        <span class="indicator {{ doc.indicator_color or "darkgrey" }}">
            {{ doc.indicator_title or doc.status or "Submitted" }}
	{% if doc.doctype == "Delivery Note" %}
	 <div class="col-sm-6 text-right">
		<label>Receipt Status</label>
    {% elif doc.doctype == "Sales Order" %}
	 <div class="col-sm-6 text-right">
		<label>Expected Date of Delivery : {{ doc.delivery_date }}</label>
		{% frappe.db.get_value("Delivery Note",{"from_sales_order"},"delivery_order_status"  %}
    {% endif %}
    <div class="col-xs-6 text-left h5">
       DATE : {{ doc.get_formatted("transaction_date") }}
    {% if doc.doctype == "Delivery Note" %}
    <div class="col-sm-6" align="right">
		<select class="form-control"  placeholder="{{ _('Status') }}" width ="25%">
			<option> Not Recieved </option>
			<option> Recieved </option>
		<a class='btn btn-primary' id="p1"
	{{ _("Update Status") }}</a>		
	{% endif %}

But Frappe code doesn’t work here… so how can I get the status here?
Can anybody help me?

What is not working? Share screenshots etc.

My screenshot is pasted below: (comes when adds ‘frappe’ command )


Traceback (innermost last):
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/website/", line 25, in render
    data = render_page_by_language(path)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/website/", line 91, in render_page_by_language
    return render_page(path)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/website/", line 107, in render_page
    return build(path)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/website/", line 114, in build
    return build_page(path)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/website/", line 128, in build_page
    html = frappe.get_template(context.template).render(context)
  File "/home/erpnext/frappe-fmcg/apps/frappe/frappe/utils/", line 23, in get_template
    return get_jenv().get_template(path)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 812, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 786, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 405, in load
    return loader.load(environment, name, globals)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 125, in load
    code = environment.compile(source, name, filename)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 565, in compile
    self.handle_exception(exc_info, source_hint=source_hint)
  File "/home/erpnext/frappe-fmcg/env/local/lib/python2.7/site-packages/jinja2/", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/erpnext/frappe-fmcg/apps/erpnext/erpnext/./templates/pages/order.html", line 37, in template
    {% frappe.db.get_value("Delivery Note",{"from_sales_order"},"delivery_order_status"  %}
 TemplateSyntaxError: Encountered unknown tag 'frappe'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.

Can u help me?