forked from progrium/postbin
/
bin.html
41 lines (39 loc) · 2.25 KB
/
bin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% extends 'base.html' %}
{% block title %}PostBin - {{ bin.name }}{% endblock %}
{% block header %}<link href="/{{ bin.name }}/feed" type="application/atom+xml" rel="alternate" title="Feed of PostBin {{ bin.name }}" />{% endblock %}
{% block content %}
<p>All POST requests to this URL are logged for you to see here, sorted newest to oldest.</p>
{% for post in posts %}
<div class="post">
<a href="#{{ post.id }}" title="A unique ID for this request">#{{ post.id }}</a> @
{{ post.created|time:"H:i" }} {{ post.created|date:"M d Y" }}
--
{{ post.remote_addr }}
{% if post.query_string %}?{{ post.query_string }}{% endif %}<div style="float: right;"><a href="javascript:void(0)" onclick="$('#content-{{ post.id }}').css('display', 'block');$('#headers-{{ post.id }}').css('display', 'none');$(this).addClass('selected');">Content</a> | <a href="javascript:void(0)" onclick="$('#headers-{{ post.id }}').css('display', 'block');$('#content-{{ post.id }}').css('display', 'none');$(this).addClass('selected');">Headers</a></div>
<table class="headers" id="headers-{{ post.id }}" style="display: none;">
{% for header in post.headers.items %}
<tr>
<td title="{{ header.0 }}" valign="top" align="right" class="key">{{ header.0 }}</td>
<td><pre>{{ header.1|escape }}</pre>
</td></tr>
{% endfor %}
</table>
<table id="content-{{ post.id }}">
{% for part in post %}
<tr>
<td title="{{ part.0 }}" valign="top" align="right" class="key">{{ part.0 }}</td>
<td>
{% if part.1.file_digest %}
<img src="http://www.stdicon.com/{{ part.1.file_extension|default:"text/plain" }}?size=16&default=http%3A%2F%2Fwww.stdicon.com%2Ftext%2Fplain" style="vertical-align: middle; margin-right: 2px; margin-top: -4px;" /><pre>{{ part.1.file_name }}</pre> ({{ part.1.file_size }}KB)<br />
<code>{{ part.1.file_digest}}</code>
{% else %}
<pre>{{ part.1|escape }}</pre>
{% endif %}
</td></tr>
{% endfor %}
</table>
</div>
{% endfor %}
<a href="/">← Home</a>
<a href="/{{ bin.name }}/feed" style="display: block; float: right;">Atom Feed</a>
{% endblock %}