aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:42:39 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:42:39 +0200
commitd337ac75295bbd70524ec7004db17426548db5ef (patch)
tree73dba241d6c15e80229dc369d4150ee2fae697ba
parentoops. (diff)
downloadnewspipe-d337ac75295bbd70524ec7004db17426548db5ef.tar.gz
newspipe-d337ac75295bbd70524ec7004db17426548db5ef.tar.bz2
newspipe-d337ac75295bbd70524ec7004db17426548db5ef.zip
Ouf.
-rw-r--r--Procfile3
-rw-r--r--fix.py28
-rw-r--r--pyaggr3g470r/views.py1
3 files changed, 1 insertions, 31 deletions
diff --git a/Procfile b/Procfile
index ea9cca1b..b684c297 100644
--- a/Procfile
+++ b/Procfile
@@ -1,3 +1,2 @@
web: python runserver.py
-init: python db_create.py
-fix: python fix.py \ No newline at end of file
+init: python db_create.py \ No newline at end of file
diff --git a/fix.py b/fix.py
deleted file mode 100644
index 876705db..00000000
--- a/fix.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /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
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 0d85aeb7..8d214144 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -714,7 +714,6 @@ def create_user(user_id=None):
form.populate_obj(user)
if form.password.data != "":
user.set_password(form.password.data)
- user.roles = [role_user]
db.session.commit()
flash(gettext('User') + ' ' + user.nickname + ' ' + gettext('successfully updated.'), 'success')
else:
bgstack15