turns out that didn't work
This commit is contained in:
parent
aeb1403a6c
commit
9c44286436
4 changed files with 3 additions and 10 deletions
|
@ -10,8 +10,6 @@ from sqlalchemy.orm import scoped_session,sessionmaker
|
|||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.sql import text
|
||||
|
||||
import git
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read('config.ini')
|
||||
|
||||
|
@ -28,9 +26,6 @@ db = scoped_session(sessionmaker(bind=engine))
|
|||
|
||||
Base = declarative_base()
|
||||
|
||||
repo = git.Repo(search_parent_directories=True)
|
||||
sha = repo.head.object.hexsha
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = 'users'
|
||||
id = Column(Integer, primary_key=True)
|
||||
|
@ -110,7 +105,7 @@ def register():
|
|||
{"username": username, "password": password})
|
||||
db.commit()
|
||||
return redirect('/auth/login/') # redirect to login page after successful registration
|
||||
return render_template('register.j2', instanceLocation=instanceLocation, instanceBranding=instanceBranding, commit=str(sha))
|
||||
return render_template('register.j2', instanceLocation=instanceLocation, instanceBranding=instanceBranding)
|
||||
|
||||
@app.route('/auth/logout/')
|
||||
def logout():
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
NyxAsk at {{ instanceBranding }}
|
||||
</h1>
|
||||
<p>
|
||||
NyxAsk version {{ version }} (commit {{ commit }})
|
||||
NyxAsk version {{ version }} (commit TODO)
|
||||
</p>
|
||||
<p>
|
||||
Source code: <a href="https://git.everypizza.im/n/nyxask/">https://git.everypizza.im/n/nyxask/</a>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
flask
|
||||
flask-sqlalchemy
|
||||
psycopg2
|
||||
gitpython
|
||||
psycopg2
|
|
@ -7,7 +7,6 @@ in pkgs.mkShell {
|
|||
flask
|
||||
flask-sqlalchemy
|
||||
psycopg2
|
||||
gitpython
|
||||
]))
|
||||
];
|
||||
}
|
Loading…
Add table
Reference in a new issue