Skip to content

Commit

Permalink
version number is now stored in config
Browse files Browse the repository at this point in the history
  • Loading branch information
technikamateur committed Sep 25, 2019
1 parent a768090 commit fbf14de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions dirkules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
db = SQLAlchemy(app)
csrf = CSRFProtect()
csrf.init_app(app)
app_version = app.config["VERSION"]

import dirkules.models

Expand Down
2 changes: 2 additions & 0 deletions dirkules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from apscheduler.jobstores.base import ConflictingIdError
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore

VERSION = "1.0"

baseDir = os.path.abspath(os.path.dirname(__file__))
staticDir = os.path.join(baseDir, 'static')

Expand Down
5 changes: 2 additions & 3 deletions dirkules/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import subprocess
from time import sleep
from flask import render_template, redirect, request, url_for, flash, abort
from dirkules import app, db, scheduler
from dirkules import app, db, scheduler, app_version
import dirkules.manager.serviceManager as servMan
import dirkules.manager.driveManager as driveMan
import dirkules.manager.cleaning as cleaningMan
Expand Down Expand Up @@ -74,8 +74,7 @@ def add_pool():

@app.route('/about', methods=['GET'])
def about():
version = "1.0"
return render_template('about.html', version=version)
return render_template('about.html', version=app_version)


@app.route('/partitions/<part>', methods=['GET'])
Expand Down

0 comments on commit fbf14de

Please sign in to comment.