Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions resweb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def authenticate():
def requires_auth(f):
@wraps(f)
def decorated(*args, **kwargs):
print app.config.get('BASIC_AUTH')
print(app.config.get('BASIC_AUTH'))
auth = request.authorization
if app.config.get('BASIC_AUTH') and (not auth or not check_auth(auth.username, auth.password)):
return authenticate()
Expand Down Expand Up @@ -192,7 +192,7 @@ def worker(worker_id):
'resweb_version': view_worker.resweb_version(),
'address': view_worker.address()
}
print data
print(data)
return render_template('worker.html', data=data)

@app.route('/workers/')
Expand All @@ -207,7 +207,7 @@ def workers():
'resweb_version': view_workers.resweb_version(),
'address': view_workers.address()
}
print data
print(data)
return render_template('workers.html', data=data)

@app.route('/stats/')
Expand All @@ -228,7 +228,7 @@ def stats(key):
'resweb_version': view_stats.resweb_version(),
'address': view_stats.address()
}
print data
print(data)
return render_template('stats.html', data=data)

@app.route('/stat/<stat_id>/')
Expand All @@ -245,7 +245,7 @@ def stat(stat_id):
'resweb_version': view_stat.resweb_version(),
'address': view_stat.address()
}
print data
print(data)
return render_template('stat.html', data=data)

@app.route('/delayed/')
Expand All @@ -262,7 +262,7 @@ def delayed():
'resweb_version': view_delayed.resweb_version(),
'address': view_delayed.address()
}
print data
print(data)
return render_template('delayed.html', data=data)

@app.route('/delayed/<timestamp>/')
Expand All @@ -280,7 +280,7 @@ def delayed_timestamp(timestamp):
'resweb_version': view_dt.resweb_version(),
'address': view_dt.address()
}
print data
print(data)
return render_template('delayed_timestamp.html', data=data)

def main():
Expand Down
3 changes: 2 additions & 1 deletion resweb/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import division
from pyres import __version__
from resweb import __version__ as res_version
from pyres.worker import Worker as Wrkr
Expand Down Expand Up @@ -30,7 +31,7 @@ def resweb_version(self):
def pages(self, start, size, link_function, width=20):
pages = []

num_pages = size / width
num_pages = size // width
if size % width > 0:
num_pages += 1

Expand Down