new: Add date picker
parent
5e0f198836
commit
5cfd5df97e
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wget https://code.jquery.com/ui/1.12.1/jquery-ui.js -O web/static/jquery-ui.js
|
||||||
|
wget https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css -O web/static/jquery-ui.css
|
|
@ -1,3 +1,4 @@
|
||||||
# Web thing
|
# Web thing
|
||||||
flask
|
flask
|
||||||
flask-bootstrap
|
flask-bootstrap
|
||||||
|
Flask-Datepicker
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
from flask import Flask, render_template, request
|
from flask import Flask, render_template, request
|
||||||
from flask_bootstrap import Bootstrap
|
from flask_bootstrap import Bootstrap
|
||||||
|
from flask_datepicker import datepicker
|
||||||
|
|
||||||
from bgpranking.querying import Querying
|
from bgpranking.querying import Querying
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ app = Flask(__name__)
|
||||||
|
|
||||||
Bootstrap(app)
|
Bootstrap(app)
|
||||||
app.config['BOOTSTRAP_SERVE_LOCAL'] = True
|
app.config['BOOTSTRAP_SERVE_LOCAL'] = True
|
||||||
|
datepicker(app=app, local=['static/jquery-ui.js', 'static/jquery-ui.css'])
|
||||||
|
|
||||||
app.debug = True
|
app.debug = True
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
ASN to search: <input type=number name=asn>
|
ASN to search: <input type=number name=asn>
|
||||||
<input type="submit" value="Search">
|
<input type="submit" value="Search">
|
||||||
</form>
|
</form>
|
||||||
|
<form class="verticalform">
|
||||||
|
<input type="text" class="form-control dp" />
|
||||||
|
</form>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ASN</th>
|
<th>ASN</th>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
{{ datepicker.loader() }}
|
||||||
|
{{ datepicker.picker(id=".dp") }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
Loading…
Reference in New Issue