-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #56 - help page including versionfinder info
- Loading branch information
Showing
6 changed files
with
113 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Help / Docs / Code - BiweeklyBudget{% endblock %} | ||
{% block body %} | ||
{% include 'notifications.html' %} | ||
<!-- /.row --> | ||
<div class="row" id="content-row"> | ||
<div class="col-lg-12"> | ||
<ul> | ||
<li><strong>Project Homepage:</strong> <a href="{{ url }}">{{ url }}</a></li> | ||
<li><strong>Documentation:</strong> <a href="http://biweeklybudget.readthedocs.io/">http://biweeklybudget.readthedocs.io/</a> <em>(for this version: <a href="http://biweeklybudget.readthedocs.io/en/{{ version }}/">http://biweeklybudget.readthedocs.io/en/{{ version }}/</a>)</em></li> | ||
<li><strong>Issues / Bug Reports / Support:</strong> <a href="https://github.com/jantman/biweeklybudget/issues">https://github.com/jantman/biweeklybudget/issues</a></li> | ||
<li><strong>Code Repository:</strong> <a href="https://github.com/jantman/biweeklybudget">https://github.com/jantman/biweeklybudget</a></li> | ||
</ul> | ||
<p><strong>biweeklybudget is <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL 3.0</a> Free/Open Source Software. Anyone who can access or interact with this interface is entitled to the full source code of this exact running version.</strong></p> | ||
</div> | ||
<!-- /.col-lg-12 --> | ||
<div class="col-lg-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading">Support Information</div> | ||
<!-- /.panel-heading --> | ||
<div class="panel-body"> | ||
<dl> | ||
<dt>Database URI</dt> | ||
<dd>{{ db_uri }}</dd> | ||
<dt>Versionfinder long_str</dt> | ||
<dd>{{ ver_info }}</dd> | ||
<dt>User-Agent</dt> | ||
<dd>{{ ua_str }}</dd> | ||
</dl> | ||
</div> | ||
<!-- /.panel-body --> | ||
</div> | ||
<!-- /.panel-default | ||
</div> | ||
<!-- /.col-lg-12 --> | ||
</div> | ||
<!-- /.row --> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,4 @@ | |
from .reconcile import * | ||
from .scheduled import * | ||
from .transactions import * | ||
from .help import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
""" | ||
The latest version of this package is available at: | ||
<http://github.com/jantman/biweeklybudget> | ||
################################################################################ | ||
Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> | ||
This file is part of biweeklybudget, also known as biweeklybudget. | ||
biweeklybudget is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
biweeklybudget is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with biweeklybudget. If not, see <http://www.gnu.org/licenses/>. | ||
The Copyright and Authors attributions contained herein may not be removed or | ||
otherwise altered, except to add the Author attribution of a contributor to | ||
this work. (Additional Terms pursuant to Section 7b of the AGPL v3) | ||
################################################################################ | ||
While not legally required, I sincerely request that anyone who finds | ||
bugs please submit them at <https://github.com/jantman/biweeklybudget> or | ||
to me via email, and that you send any contributions or improvements | ||
either as a pull request on GitHub, or to me via email. | ||
################################################################################ | ||
AUTHORS: | ||
Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> | ||
################################################################################ | ||
""" | ||
|
||
import logging | ||
from flask.views import MethodView | ||
from flask import render_template, request | ||
from versionfinder import find_version | ||
|
||
from biweeklybudget.flaskapp.app import app | ||
from biweeklybudget.version import VERSION, PROJECT_URL | ||
from biweeklybudget.settings import DB_CONNSTRING | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
for lname in ['versionfinder', 'pip', 'git']: | ||
l = logging.getLogger(lname) | ||
l.setLevel(logging.CRITICAL) | ||
l.propagate = True | ||
|
||
|
||
class HelpView(MethodView): | ||
""" | ||
Render the GET /help view using the ``help.html`` template. | ||
""" | ||
|
||
def get(self): | ||
return render_template( | ||
'help.html', | ||
ver_info=find_version('biweeklybudget').long_str, | ||
version=VERSION, | ||
url=PROJECT_URL, | ||
ua_str=request.headers.get('User-Agent', 'unknown'), | ||
db_uri=DB_CONNSTRING | ||
) | ||
|
||
|
||
app.add_url_rule('/help', view_func=HelpView.as_view('help_view')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,4 @@ pytz | |
requests==2.13.0 | ||
selenium==3.0.2 | ||
six==1.10.0 | ||
versionfinder==0.1.0 |