Browse Source

update root url

master
wes 8 years ago
parent
commit
9e65710836
  1. 3
      .gitignore
  2. 0
      __init__.py
  3. 20
      src/templates/search.html
  4. 7
      src/website.py

3
.gitignore

@ -1,5 +1,4 @@
*.swp
*.sw*
*.pyc
*.swo
.vim-session
*~

0
__init__.py

20
src/templates/search.html

@ -28,20 +28,20 @@
{% block styles %}
{{super()}}
<link rel="stylesheet" href="http://localhost:8001/styles/spectre.min.css">
<link rel="stylesheet" href="http://localhost:8001/styles/search.css">
<link rel="stylesheet" href="{{ url_for('send_style', filename='spectre.min.css') }}">
<link rel="stylesheet" href="{{ url_for('send_style', filename='search.css') }}">
{% endblock %}
{{ url_for('send_script', filename='') }}
{% block scripts %}
{{super()}}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/riot/2.4.1/riot+compiler.min.js"></script>
<script type="text/javascript" src="http://localhost:8001/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>
<script type="riot/tag" src="http://localhost:8001/scripts/search.tag"></script>
<script type="riot/tag" src="http://localhost:8001/scripts/book.tag"></script>
<script type="riot/tag" src="http://localhost:8001/scripts/class.tag"></script>
<script type="riot/tag" src="http://localhost:8001/scripts/row.tag"></script>
<script type="riot/tag" src="http://localhost:8001/scripts/results.tag"></script>
<script type="text/javascript" src="http://localhost:8001/scripts/search.js"></script>
<script type="text/javascript" src="{{ url_for('send_script', filename='jquery-ui-1.11.4.custom/jquery-ui.min.js') }}"></script>
<script type="riot/tag" src="{{ url_for('send_script', filename='search.tag') }}"></script>
<script type="riot/tag" src="{{ url_for('send_script', filename='book.tag') }}"></script>
<script type="riot/tag" src="{{ url_for('send_script', filename='class.tag') }}"></script>
<script type="riot/tag" src="{{ url_for('send_script', filename='row.tag') }}"></script>
<script type="riot/tag" src="{{ url_for('send_script', filename='results.tag') }}"></script>
<script type="text/javascript" src="{{ url_for('send_script', filename='search.js') }}"></script>
{% endblock %}
</body>
</html>

7
src/website.py

@ -1,6 +1,5 @@
#! /usr/bin/python2
from functools import partial
from couchdb import ResourceConflict
from flask import Flask, render_template, flash, request, send_from_directory
from flask_bootstrap import Bootstrap
@ -61,8 +60,8 @@ def ClassSearch(configfile=None):
# https://github.com/mbr/flask-appconfig
Bootstrap(app)
app.config["scripts"] = "/home/wes/MGOAL/scripts"
app.config["styles"] = "/home/wes/MGOAL/styles"
app.config["scripts"] = "./scripts"
app.config["styles"] = "./styles"
@app.route('/favicon.ico')
def favicon():
@ -145,4 +144,4 @@ def ClassSearch(configfile=None):
return app
if __name__ == "__main__":
ClassSearch().run(port=8001, debug=True)
ClassSearch("./appconfig").run(port=8001, debug=True)

Loading…
Cancel
Save