Skip to content

Commit

Permalink
fixed responsive a bit, and added pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
BillKeenan committed Dec 21, 2017
1 parent 82eb711 commit a0f5156
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ __pycache__
.coverage
htmlcov/
*DS_Store
.vscode/
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,7 @@ before_deploy:
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
- py.test dead_test.py --cov=deadWeb && coverage html -d /tmp/coverage
- pylint -disable=R,C deadWeb/dead.py >> /tmp/coverage

deploy:
provider: script
Expand Down
4 changes: 3 additions & 1 deletion config/main.py
@@ -1 +1,3 @@
DEBUG = True
DEBUG = True
HOST="0.0.0.0"
PORT=5000
4 changes: 3 additions & 1 deletion config/prod.py
@@ -1 +1,3 @@
DEBUG = False
DEBUG = False
HOST="127.0.0.1"
PORT=5000
21 changes: 8 additions & 13 deletions deadWeb/dead.py
Expand Up @@ -76,24 +76,19 @@ def send_css(path):

@app.route("/drop",methods = ['POST'])
def drop():
#ok, looks alright
"""ok, looks alright"""
key = handler.drop(request.form["data"])
return jsonify(id=key)

@app.route("/pickup/<id>")
def pickupDropIndex(id):
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
return render_template('index.htm',id=id)
def pickup_drop_index(drop_id):
"""Load the pickup HTML"""
return render_template('index.htm', id=drop_id)


@app.route("/getdrop.php?id=<id>")
@app.route("/drop/<id>")
def picupDropJSON(id):
returnData = handler.pickup(id)
return Response(returnData,mimetype='application/json')



if __name__ == "__main__":
app.run(host='0.0.0.0')

def pickup_drop_json(drop_id):
"""Actually get the drop from the DB"""
return_data = handler.pickup(drop_id)
return Response(return_data, mimetype='application/json')
11 changes: 2 additions & 9 deletions deadWeb/templates/index.htm
@@ -1,6 +1,3 @@



<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -15,8 +12,7 @@
><meta name="description" content="Allows you to create a one-time use link to securely send passwords or other information" />
<meta name="keywords" content="dead drop,security,encryption,passwords,secure" />
<meta name="revisit-after" content="3 month" />


<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- secure, password, encryption ->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
Expand Down Expand Up @@ -174,7 +170,7 @@ <h2>Want to help pay the bills?</h2>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="/js/bootstrap.min.js"></script>
<script src="/js/sjcl.js"></script>
Expand All @@ -185,9 +181,6 @@ <h2>Want to help pay the bills?</h2>
s.setAttribute('src',src);
document.body.appendChild( s );
</script>

<script src="/js/merseen.js"></script>
-->

</body>
</html>
2 changes: 1 addition & 1 deletion wsgi.py
Expand Up @@ -2,4 +2,4 @@
from config import main

if __name__ == "__main__":
app.run(debug=main.DEBUG)
app.run(debug=main.DEBUG,host= main.HOST,port=main.PORT)

0 comments on commit a0f5156

Please sign in to comment.