Browse Source

"BUGFIX Diet can be null"

master
Doug Le Tough 3 years ago
parent
commit
9bebf9c939
3 changed files with 8 additions and 5 deletions
  1. +0
    -1
      config.py
  2. +4
    -0
      config.py
  3. +2
    -2
      participate.py
  4. +2
    -2
      templates/account.html

+ 0
- 1
config.py View File

@ -1 +0,0 @@
config.local.py

+ 4
- 0
config.py View File

@ -0,0 +1,4 @@
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = "postgresql://participer_thsf:participer_thsf@localhost/participer_thsf"
UPLOADED_FILES_DEST = "./upload"
DOMAIN_URL = "https://participer.redatomik.org"

+ 2
- 2
participate.py View File

@ -362,8 +362,8 @@ def check_user_info():
name = user.name
phone = user.phone
diet = user.diet
if name == None or phone == None or diet == None or \
len(name) == 0 or len(phone) == 0 or len(diet) == 0:
if name == None or phone == None or \
len(name) == 0 or len(phone) == 0:
message = "Vos informations personnelles ne sont pas complètement renseignées. N'oubliez pas de remplir votre fiche située dans la section 'Mon compte'"
return message.decode('utf-8')


+ 2
- 2
templates/account.html View File

@ -22,8 +22,8 @@
<label>Pseudonyme: </label><input id='name' name='name' type='text' value='{{ name }}' required maxlength=20/><br/>
<label>Nouveau mot de passe: </label><input id='password' name='password' type='password'/><br/>
<label>Confirmation mot de passe: </label><input id='confirm' name='confirm' type='password'/><br/>
<label>Numéro de téléphone: </label><input id='phone' name='phone' type='text' value='{{ phone }}'/><br/>
<label>Régime alimentaire et remarques: </label><input id='diet' name='diet' type='text' value='{{ diet }}'/><br/>
<label>Numéro de téléphone: </label><input id='phone' name='phone' type='text' value='{{ phone }}' required /><br/>
<label>Régime alimentaire et remarques: </label><input id='diet' name='diet' type='text' value='{{ diet }}' /><br/>
<input type='submit' value='Update' onclick='javascript:return update_account();'>
</form>
</article>


Loading…
Cancel
Save