From 99c3bed49f6ee0124be79de66a91daaa5f56f735 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 5 May 2014 14:09:50 +0200 Subject: Improved make_valid_nickname function. --- README.rst | 2 +- db_create.py | 2 +- messages.pot | 2 +- pyaggr3g470r/models.py | 2 +- pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo | Bin 9898 -> 9898 bytes pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po | 4 ++-- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 17b576ad..ac39c0e8 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ Deployment This application can be deployed on Heroku or on a traditional server. -After installation, you will be able to connect with the email *root@pyAggr3g470r.localhost* and the password *root*. +After installation, you will be able to connect with the email *root@pyAggr3g470r.localhost* and the password *root_password*. Deploying the application on Heroku diff --git a/db_create.py b/db_create.py index f2eec828..7cdd6411 100644 --- a/db_create.py +++ b/db_create.py @@ -69,7 +69,7 @@ role_user = Role(name="user") user1 = User(firstname="admin", lastname="admin", email="root@pyAggr3g470r.localhost", - pwdhash=generate_password_hash("root")) + pwdhash=generate_password_hash("root_password")) user1.roles.extend([role_admin, role_user]) db.session.add(user1) diff --git a/messages.pot b/messages.pot index a2295726..d72a0ea0 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2014-05-05 13:39+0200\n" +"POT-Creation-Date: 2014-05-05 14:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index dcbe221c..9770ed77 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -51,7 +51,7 @@ class User(db.Model, UserMixin): @staticmethod def make_valid_nickname(nickname): - return re.sub('[^a-zA-Z0-9_\.\-]', '', nickname) + return re.sub(ur'[^\w]', '', nickname, flags=re.U) def get_id(self): """ diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo index 930ffe2a..6fb63ea3 100644 Binary files a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo and b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo differ diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po index eac8cfe2..0172f25b 100644 --- a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po +++ b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2014-05-05 13:39+0200\n" -"PO-Revision-Date: 2014-05-05 13:39+0100\n" +"POT-Creation-Date: 2014-05-05 14:07+0200\n" +"PO-Revision-Date: 2014-05-05 14:07+0100\n" "Last-Translator: Cédric Bonhomme \n" "Language-Team: fr \n" "Language: fr\n" -- cgit