Commit dc68246c authored by svilayphiou's avatar svilayphiou

mimetype for rss

parent 056f283c
......@@ -185,8 +185,10 @@ class Pad(models.Model):
def getLastEdited(self):
from datetime import datetime
import email.utils
timestamp = self.epclient.getLastEdited(self.padid)
return datetime.fromtimestamp(timestamp['lastEdited']/1000)
dt = datetime.fromtimestamp(timestamp['lastEdited']/1000)
return email.utils.format_datetime(dt)
def getFirstLines(self):
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
{% load wikify %}
version="1.0" encoding="utf-8"?>
<rss version="2.0"
<title>{{ site_name }}</title>
<link>{{ SITE_DOMAIN }}</link>
......@@ -439,7 +439,7 @@ def rss(request):
return render(request, "rss.xml", context)
return render(request, "rss.xml", context, "text/xml")
def padOrFallbackPath(request, slug, fallbackPath, mimeType):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment