Procházet zdrojové kódy

Some cleanup

pull/24/head
Ben Kurtovic před 12 roky
rodič
revize
cb323f8ae8
4 změnil soubory, kde provedl 26 přidání a 19 odebrání
  1. +2
    -2
      pages/debug.mako
  2. +22
    -15
      pages/settings.mako
  3. +1
    -1
      static/css/main.css
  4. +1
    -1
      toolserver/settings.py

+ 2
- 2
pages/debug.mako Zobrazit soubor

@@ -2,9 +2,9 @@
<ul>
% for key, value in environ.items():
% if key not in ["wsgi.input", "wsgi.errors", "PATH"]:
<li><b>${key}</b>: ${value}</li>
<li><b>${key}</b>: ${value | h}</li>
% elif key == "wsgi.input":
<li><b>${key}</b>: ${value.read(environ.get("CONTENT_LENGTH", 0))}</li>
<li><b>${key}</b>: ${value.read(environ.get("CONTENT_LENGTH", 0)) | h}</li>
% endif
% endfor
</ul>


+ 22
- 15
pages/settings.mako Zobrazit soubor

@@ -45,23 +45,30 @@
</form>
<h2>Cookies</h2>
% if cookies:
<ul>
<table>
% for cookie in cookies.itervalues():
<li>
<tt>${cookie.key | h}</tt>: <tt>${cookie.value | h}</tt>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="cookie" value="${cookie.key | h}">
<button type="submit">Delete</button>
</form>
</li>
<tr>
<td><b><tt>${cookie.key | h}</tt></b></td>
<td><tt>${cookie.value | h}</tt></td>
<td>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="cookie" value="${cookie.key | h}">
<button type="submit">Delete</button>
</form>
</td>
</tr>
% endfor
</ul>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="all" value="1">
<button type="submit">Delete all</button>
</form>
<tr>
<td>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="all" value="1">
<button type="submit">Delete all</button>
</form>
</td>
</tr>
</table>
% else:
<p>No cookies!</p>
% endif


+ 1
- 1
static/css/main.css Zobrazit soubor

@@ -28,7 +28,7 @@ div#container {
div#footer {
position: fixed;
width: 100%;
height: 70px;
height: 50px;
bottom: 0;
font-size: 12px;
text-align: center;


+ 1
- 1
toolserver/settings.py Zobrazit soubor

@@ -21,7 +21,7 @@ def main(context, environ, headers):
if query.cookie in cookies:
delete_cookie(headers, cookies, query.cookie)
elif query.all:
for cookie in cookies.values:
for cookie in cookies.values():
if cookie.path.startswith(cookies.path):
delete_cookie(headers, cookies, cookie.key)



Načítá se…
Zrušit
Uložit