aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:36:58 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:36:58 +0200
commit0334249e9508f4a4f9d1f9d5b1363dba4b8f67d5 (patch)
tree4c57feb5271cac95b297bae7062ff4b9c50babfa
parentUpdated dashboard. (diff)
downloadnewspipe-0334249e9508f4a4f9d1f9d5b1363dba4b8f67d5.tar.gz
newspipe-0334249e9508f4a4f9d1f9d5b1363dba4b8f67d5.tar.bz2
newspipe-0334249e9508f4a4f9d1f9d5b1363dba4b8f67d5.zip
oops.
-rw-r--r--Procfile3
-rw-r--r--fix.py28
2 files changed, 30 insertions, 1 deletions
diff --git a/Procfile b/Procfile
index b684c297..ea9cca1b 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1,3 @@
web: python runserver.py
-init: python db_create.py \ No newline at end of file
+init: python db_create.py
+fix: python fix.py \ No newline at end of file
diff --git a/fix.py b/fix.py
new file mode 100644
index 00000000..876705db
--- /dev/null
+++ b/fix.py
@@ -0,0 +1,28 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+__author__ = "Cedric Bonhomme"
+__version__ = "$Revision: 0.3 $"
+__date__ = "$Date: 2014/03/16 $"
+__revision__ = "$Date: 2014/04/12 $"
+__copyright__ = "Copyright (c) Cedric Bonhomme"
+__license__ = "AGPLv3"
+
+from pyaggr3g470r import db
+from pyaggr3g470r.models import User, Role
+from werkzeug import generate_password_hash
+
+from sqlalchemy.engine import reflection
+from sqlalchemy.schema import (
+ MetaData,
+ Table,
+ DropTable,
+ ForeignKeyConstraint,
+ DropConstraint,
+ )
+
+
+role_admin = Role.query.filter(Role.name == "admin").first()
+user = User.query.filter(User.email == "kimble.mandel@gmail.com").first()
+user.roles = [role_admin]
+db.session.commit() \ No newline at end of file
bgstack15