Skip to content
Browse files

Added a debug template for conveniance during dev

  • Loading branch information...
1 parent 43c8049 commit c165ea795e31c7f40d6feb08df3a283ff2ddbd04 @sfyn committed
Showing with 31 additions and 0 deletions.
  1. +31 −0 django_etherpad_lite/templates/etherpad-lite/debug.html
View
31 django_etherpad_lite/templates/etherpad-lite/debug.html
@@ -0,0 +1,31 @@
+{% extends "etherpad-lite/base.html" %}
+{% load url from future %}
+
+{% block sidebar %}
+ <div style="display:none">
+ <h2>To use this template, paste this code into your view:</h2>
+ <pre>
+dump = {
+ 'sessReq': sessReq,
+ 'sessResp': sessResp.__str__(),
+ 'SESSION_LENGTH': config.SESSION_LENGTH.__str__(),
+ 'expireStr': expireStr,
+ 'server.hostname': server.hostname.__str__(),
+}
+response = render_to_response('etherpad-lite/debug.html', {'dump':dump});
+return response
+ </pre>
+ </div>
+{% endblock %}
+
+{% block content %}
+
+<h1>{{name}}</h1>
+
+ <dl>
+{% for val, data in dump.items %}
+ <dt>{{val}}</dt><dd>{{data}}</dd>
+{% endfor %}
+ </dl>
+
+{% endblock %}

0 comments on commit c165ea7

Please sign in to comment.
Something went wrong with that request. Please try again.