{% extends "../base.html" %}
-{% block title %}{{ entry.subject or _("Paste %s") % entry.uuid }}{% end block %}
+{% block title %}{{ paste }}{% end block %}
{% block container %}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
<h1 class="title">
- {{ entry.subject or _("Paste %s") % entry.uuid }}
+ {{ paste.subject or _("Paste") }}
</h1>
<h6 class="subtitle">
- {{ _("Uploaded %s by %s") % (locale.format_date(entry.time_created), entry.account or "N/A") }}
+ {{ _("Uploaded %s by %s") % (locale.format_date(paste.time_created), paste.account or "N/A") }}
</h6>
</div>
</div>
<section class="section">
<div class="container">
- {% if entry.mimetype.startswith("text/") %}
+ {% if paste.mimetype.startswith("text/") %}
<div class="block">
- {% module Code(entry.blob) %}
+ {% module Code(paste.blob) %}
</div>
- {% elif entry.mimetype.startswith("image/") %}
+ {% elif paste.mimetype.startswith("image/") %}
<div class="block">
<figure class="image">
- <img src="/raw/{{ entry.uuid }}">
+ <img src="/raw/{{ paste.uuid }}">
</figure>
</div>
{% end %}
<div class="buttons">
- <a class="button is-primary is-fullwidth" href="/raw/{{ entry.uuid }}">
+ <a class="button is-primary is-fullwidth" href="/raw/{{ paste.uuid }}">
<span class="icon-text">
<span class="icon">
<i class="fas fa-file-download"></i>
</span>
- <span>{{ _("Download") }} ({{ format_size(entry.size) }})</span>
+ <span>{{ _("Download") }} ({{ format_size(paste.size) }})</span>
</span>
</a>
</div>
class ViewHandler(base.AnalyticsMixin, base.BaseHandler):
def get(self, uid):
with self.db.transaction():
- entry = self.backend.nopaste.get(uid)
- if not entry:
+ paste = self.backend.nopaste.get(uid)
+ if not paste:
raise tornado.web.HTTPError(404)
# This has received a view
- entry.viewed()
+ paste.viewed()
- self.render("nopaste/view.html", entry=entry)
+ self.render("nopaste/view.html", paste=paste)
class CodeModule(ui_modules.UIModule):