Removed slotmachien slack stuff

This commit is contained in:
Wout Schellaert 2015-03-27 14:03:28 +01:00
parent 55a5c9b927
commit 56c908c63f
3 changed files with 4 additions and 9 deletions

View file

@ -29,6 +29,7 @@ class LocationAdminModel(ModelBaseView):
admin = Admin(app, name='FoodBot', url='/admin', template_mode='bootstrap3') admin = Admin(app, name='FoodBot', url='/admin', template_mode='bootstrap3')
admin.add_view(UserAdminModel(User, db.session)) admin.add_view(UserAdminModel(User, db.session))
admin.add_view(LocationAdminModel(Location, db.session)) admin.add_view(LocationAdminModel(Location, db.session))
admin.add_view(ModelBaseView(Food, db.session)) admin.add_view(ModelBaseView(Food, db.session))

View file

@ -8,8 +8,8 @@ feli = User()
feli.configure("feliciaan", True, 0) feli.configure("feliciaan", True, 0)
db.session.add(feli) db.session.add(feli)
wout = User() destro = User()
wout.configure('wout', True, 0) destro.configure('destro', True, 0)
# To future developers, add yourself here # To future developers, add yourself here

View file

@ -65,13 +65,7 @@ def login_and_redirect_user(user):
def create_user(username): def create_user(username):
user = User() user = User()
user.configure(username, False) user.configure(username, False, 1)
db.session.add(user) db.session.add(user)
db.session.commit() db.session.commit()
# EASTER EGG
text = 'Welcome ' + username + '!'
js = json.dumps({'text': text})
url = app.config['SLACK_WEBHOOK']
if len(url) > 0:
requests.post(url, data=js)
return user return user