diff --git a/.coveragerc b/.coveragerc index be61ad50..ed8ca510 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,12 +3,10 @@ source = activity member note - theme omit = activity/tests/*.py activity/migrations/*.py member/tests/*.py member/migrations/*.py note/tests/*.py - note/migrations/*.py - theme/tests/*.py \ No newline at end of file + note/migrations/*.py \ No newline at end of file diff --git a/apps/activity/locale/fr/LC_MESSAGES/django.po b/apps/activity/locale/fr/LC_MESSAGES/django.po deleted file mode 100644 index dc8f2db2..00000000 --- a/apps/activity/locale/fr/LC_MESSAGES/django.po +++ /dev/null @@ -1,74 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-16 13:45+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: apps.py:11 models.py:61 -msgid "activity" -msgstr "activité" - -#: models.py:12 models.py:29 -msgid "name" -msgstr "nom" - -#: models.py:16 -msgid "can invite" -msgstr "peut inviter" - -#: models.py:19 -msgid "guest entry fee" -msgstr "cotisation de l'entrée invité" - -#: models.py:23 -msgid "activity type" -msgstr "type d'activité" - -#: models.py:24 -msgid "activity types" -msgstr "types d'activité" - -#: models.py:33 -msgid "description" -msgstr "description" - -#: models.py:39 -msgid "type" -msgstr "type" - -#: models.py:45 -msgid "organizer" -msgstr "organisateur" - -#: models.py:51 -msgid "attendees club" -msgstr "" - -#: models.py:54 -msgid "start date" -msgstr "date de début" - -#: models.py:57 -msgid "end date" -msgstr "date de fin" - -#: models.py:62 -msgid "activities" -msgstr "activités" - -#: models.py:88 -msgid "guest" -msgstr "invité" - -#: models.py:89 -msgid "guests" -msgstr "invités" diff --git a/apps/member/locale/fr/LC_MESSAGES/django.po b/apps/member/locale/fr/LC_MESSAGES/django.po deleted file mode 100644 index 226234a9..00000000 --- a/apps/member/locale/fr/LC_MESSAGES/django.po +++ /dev/null @@ -1,116 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-16 15:21+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: apps.py:11 -msgid "member" -msgstr "adhérent" - -#: models.py:24 -msgid "phone number" -msgstr "numéro de téléphone" - -#: models.py:30 -msgid "section" -msgstr "section" - -#: models.py:31 -msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" -msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" - -#: models.py:37 -msgid "address" -msgstr "adresse" - -#: models.py:43 -msgid "paid" -msgstr "payé" - -#: models.py:48 models.py:49 -msgid "user profile" -msgstr "profil utilisateur" - -#: models.py:57 models.py:102 -msgid "name" -msgstr "nom" - -#: models.py:62 -msgid "email" -msgstr "courriel" - -#: models.py:67 -msgid "membership fee" -msgstr "cotisation pour adhérer" - -#: models.py:71 -msgid "membership duration" -msgstr "durée de l'adhésion" - -#: models.py:72 -msgid "The longest time a membership can last (NULL = infinite)." -msgstr "La durée maximale d'une adhésion (NULL = infinie)." - -#: models.py:77 -msgid "membership start" -msgstr "début de l'adhésion" - -#: models.py:78 -msgid "How long after January 1st the members can renew their membership." -msgstr "" - -#: models.py:83 -msgid "membership end" -msgstr "fin de l'adhésion" - -#: models.py:84 -msgid "" -"How long the membership can last after January 1st of the next year after " -"members can renew their membership." -msgstr "" - -#: models.py:90 -msgid "club" -msgstr "club" - -#: models.py:91 -msgid "clubs" -msgstr "clubs" - -#: models.py:108 -msgid "role" -msgstr "rôle" - -#: models.py:109 -msgid "roles" -msgstr "rôles" - -#: models.py:126 -msgid "membership starts on" -msgstr "l'adhésion commence le" - -#: models.py:129 -msgid "membership ends on" -msgstr "l'adhésion finie le" - -#: models.py:133 -msgid "fee" -msgstr "cotisation" - -#: models.py:137 -msgid "membership" -msgstr "adhésion" - -#: models.py:138 -msgid "memberships" -msgstr "adhésions" diff --git a/apps/note/locale/fr/LC_MESSAGES/django.po b/apps/note/locale/fr/LC_MESSAGES/django.po deleted file mode 100644 index 7a9933f6..00000000 --- a/apps/note/locale/fr/LC_MESSAGES/django.po +++ /dev/null @@ -1,192 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-24 22:37+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: admin.py:112 models/transactions.py:46 -msgid "source" -msgstr "source" - -#: admin.py:120 admin.py:148 models/transactions.py:25 -#: models/transactions.py:52 -msgid "destination" -msgstr "destination" - -#: apps.py:15 models/notes.py:47 -msgid "note" -msgstr "note" - -#: models/notes.py:24 -msgid "account balance" -msgstr "solde du compte" - -#: models/notes.py:25 -msgid "in centimes, money credited for this instance" -msgstr "en centimes, argent crédité pour cette instance" - -#: models/notes.py:29 -msgid "active" -msgstr "actif" - -#: models/notes.py:32 -msgid "" -"Designates whether this note should be treated as active. Unselect this " -"instead of deleting notes." -msgstr "" -"Indique si la note est active. Désactiver cela plutôt que supprimer la note." - -#: models/notes.py:37 -msgid "display image" -msgstr "image affichée" - -#: models/notes.py:42 models/transactions.py:55 -msgid "created at" -msgstr "créée le" - -#: models/notes.py:48 -msgid "notes" -msgstr "notes" - -#: models/notes.py:56 -msgid "Note" -msgstr "Note" - -#: models/notes.py:66 models/notes.py:88 -msgid "This alias is already taken." -msgstr "Cet alias est déjà pris." - -#: models/notes.py:103 -msgid "user" -msgstr "utilisateur" - -#: models/notes.py:107 -msgid "one's note" -msgstr "note d'un utilisateur" - -#: models/notes.py:108 -msgid "users note" -msgstr "notes des utilisateurs" - -#: models/notes.py:114 -#, python-format -msgid "%(user)s's note" -msgstr "Note de %(user)s" - -#: models/notes.py:125 -msgid "club" -msgstr "club" - -#: models/notes.py:129 -msgid "club note" -msgstr "note d'un club" - -#: models/notes.py:130 -msgid "clubs notes" -msgstr "notes des clubs" - -#: models/notes.py:136 -#, python-format -msgid "Note for %(club)s club" -msgstr "Note du club %(club)s" - -#: models/notes.py:149 models/transactions.py:32 models/transactions.py:66 -msgid "type" -msgstr "type" - -#: models/notes.py:155 -msgid "special note" -msgstr "note spéciale" - -#: models/notes.py:156 -msgid "special notes" -msgstr "notes spéciales" - -#: models/notes.py:167 models/transactions.py:18 -msgid "name" -msgstr "nom" - -#: models/notes.py:173 -msgid "Invalid alias" -msgstr "Alias invalide" - -#: models/notes.py:189 -msgid "alias" -msgstr "alias" - -#: models/notes.py:190 -msgid "aliases" -msgstr "alias" - -#: models/notes.py:218 -msgid "Alias too long." -msgstr "L'alias est trop long." - -#: models/notes.py:221 -msgid "An alias with a similar name already exists." -msgstr "Un alias avec un nom similaire existe déjà." - -#: models/transactions.py:28 models/transactions.py:63 -msgid "amount" -msgstr "montant" - -#: models/transactions.py:29 -msgid "in centimes" -msgstr "en centimes" - -#: models/transactions.py:37 -msgid "transaction template" -msgstr "modèle de transaction" - -#: models/transactions.py:38 -msgid "transaction templates" -msgstr "modèles de transaction" - -#: models/transactions.py:59 -msgid "quantity" -msgstr "quantité" - -#: models/transactions.py:70 -msgid "reason" -msgstr "raison" - -#: models/transactions.py:74 -msgid "valid" -msgstr "valide" - -#: models/transactions.py:79 -msgid "transaction" -msgstr "transaction" - -#: models/transactions.py:80 -msgid "transactions" -msgstr "transactions" - -#: models/transactions.py:116 -msgid "membership transaction" -msgstr "transaction d'adhésion" - -#: models/transactions.py:117 -msgid "membership transactions" -msgstr "transactions d'adhésion" - -#: templates/note/transaction_form.html:10 -msgid "Home" -msgstr "Accueil" - -#: templates/note/transaction_form.html:53 -msgid "Transfer" -msgstr "Virement" - -#: views.py:26 -msgid "Transfer money from your account to one or others" -msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..96da86e1 --- /dev/null +++ b/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,448 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-08-14 15:14+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: apps/activity/apps.py:11 apps/activity/models.py:70 +msgid "activity" +msgstr "activité" + +#: apps/activity/models.py:15 apps/activity/models.py:38 +#: apps/member/models.py:59 apps/member/models.py:107 +#: apps/note/models/notes.py:167 apps/note/models/transactions.py:19 +#: templates/member/profile_detail.html:10 +msgid "name" +msgstr "nom" + +#: apps/activity/models.py:19 +msgid "can invite" +msgstr "peut inviter" + +#: apps/activity/models.py:22 +msgid "guest entry fee" +msgstr "cotisation de l'entrée invité" + +#: apps/activity/models.py:26 +msgid "activity type" +msgstr "type d'activité" + +#: apps/activity/models.py:27 +msgid "activity types" +msgstr "types d'activité" + +#: apps/activity/models.py:42 +msgid "description" +msgstr "description" + +#: apps/activity/models.py:48 apps/note/models/notes.py:149 +#: apps/note/models/transactions.py:34 apps/note/models/transactions.py:71 +msgid "type" +msgstr "type" + +#: apps/activity/models.py:54 +msgid "organizer" +msgstr "organisateur" + +#: apps/activity/models.py:60 +msgid "attendees club" +msgstr "" + +#: apps/activity/models.py:63 +msgid "start date" +msgstr "date de début" + +#: apps/activity/models.py:66 +msgid "end date" +msgstr "date de fin" + +#: apps/activity/models.py:71 +msgid "activities" +msgstr "activités" + +#: apps/activity/models.py:100 +msgid "guest" +msgstr "invité" + +#: apps/activity/models.py:101 +msgid "guests" +msgstr "invités" + +#: apps/member/apps.py:11 +msgid "member" +msgstr "adhérent" + +#: apps/member/models.py:24 +msgid "phone number" +msgstr "numéro de téléphone" + +#: apps/member/models.py:30 templates/member/profile_detail.html:18 +msgid "section" +msgstr "section" + +#: apps/member/models.py:31 +msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" +msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" + +#: apps/member/models.py:37 templates/member/profile_detail.html:20 +msgid "address" +msgstr "adresse" + +#: apps/member/models.py:43 +msgid "paid" +msgstr "payé" + +#: apps/member/models.py:48 apps/member/models.py:49 +msgid "user profile" +msgstr "profil utilisateur" + +#: apps/member/models.py:64 +msgid "email" +msgstr "courriel" + +#: apps/member/models.py:69 +msgid "membership fee" +msgstr "cotisation pour adhérer" + +#: apps/member/models.py:73 +msgid "membership duration" +msgstr "durée de l'adhésion" + +#: apps/member/models.py:74 +msgid "The longest time a membership can last (NULL = infinite)." +msgstr "La durée maximale d'une adhésion (NULL = infinie)." + +#: apps/member/models.py:79 +msgid "membership start" +msgstr "début de l'adhésion" + +#: apps/member/models.py:80 +msgid "How long after January 1st the members can renew their membership." +msgstr "" + +#: apps/member/models.py:85 +msgid "membership end" +msgstr "fin de l'adhésion" + +#: apps/member/models.py:86 +msgid "" +"How long the membership can last after January 1st of the next year after " +"members can renew their membership." +msgstr "" + +#: apps/member/models.py:92 apps/note/models/notes.py:125 +msgid "club" +msgstr "club" + +#: apps/member/models.py:93 +msgid "clubs" +msgstr "clubs" + +#: apps/member/models.py:113 +msgid "role" +msgstr "rôle" + +#: apps/member/models.py:114 +msgid "roles" +msgstr "rôles" + +#: apps/member/models.py:134 +msgid "membership starts on" +msgstr "l'adhésion commence le" + +#: apps/member/models.py:137 +msgid "membership ends on" +msgstr "l'adhésion finie le" + +#: apps/member/models.py:141 +msgid "fee" +msgstr "cotisation" + +#: apps/member/models.py:145 +msgid "membership" +msgstr "adhésion" + +#: apps/member/models.py:146 +msgid "memberships" +msgstr "adhésions" + +#: apps/note/admin.py:112 apps/note/models/transactions.py:51 +msgid "source" +msgstr "source" + +#: apps/note/admin.py:120 apps/note/admin.py:148 +#: apps/note/models/transactions.py:27 apps/note/models/transactions.py:57 +msgid "destination" +msgstr "destination" + +#: apps/note/apps.py:15 apps/note/models/notes.py:47 +msgid "note" +msgstr "note" + +#: apps/note/models/notes.py:24 +msgid "account balance" +msgstr "solde du compte" + +#: apps/note/models/notes.py:25 +msgid "in centimes, money credited for this instance" +msgstr "en centimes, argent crédité pour cette instance" + +#: apps/note/models/notes.py:29 +msgid "active" +msgstr "actif" + +#: apps/note/models/notes.py:32 +msgid "" +"Designates whether this note should be treated as active. Unselect this " +"instead of deleting notes." +msgstr "" +"Indique si la note est active. Désactiver cela plutôt que supprimer la note." + +#: apps/note/models/notes.py:37 +msgid "display image" +msgstr "image affichée" + +#: apps/note/models/notes.py:42 apps/note/models/transactions.py:60 +msgid "created at" +msgstr "créée le" + +#: apps/note/models/notes.py:48 +msgid "notes" +msgstr "notes" + +#: apps/note/models/notes.py:56 +msgid "Note" +msgstr "Note" + +#: apps/note/models/notes.py:66 apps/note/models/notes.py:88 +msgid "This alias is already taken." +msgstr "Cet alias est déjà pris." + +#: apps/note/models/notes.py:103 +msgid "user" +msgstr "utilisateur" + +#: apps/note/models/notes.py:107 +msgid "one's note" +msgstr "note d'un utilisateur" + +#: apps/note/models/notes.py:108 +msgid "users note" +msgstr "notes des utilisateurs" + +#: apps/note/models/notes.py:114 +#, python-format +msgid "%(user)s's note" +msgstr "Note de %(user)s" + +#: apps/note/models/notes.py:129 +msgid "club note" +msgstr "note d'un club" + +#: apps/note/models/notes.py:130 +msgid "clubs notes" +msgstr "notes des clubs" + +#: apps/note/models/notes.py:136 +#, python-format +msgid "Note for %(club)s club" +msgstr "Note du club %(club)s" + +#: apps/note/models/notes.py:155 +msgid "special note" +msgstr "note spéciale" + +#: apps/note/models/notes.py:156 +msgid "special notes" +msgstr "notes spéciales" + +#: apps/note/models/notes.py:173 +msgid "Invalid alias" +msgstr "Alias invalide" + +#: apps/note/models/notes.py:189 +msgid "alias" +msgstr "alias" + +#: apps/note/models/notes.py:190 +msgid "aliases" +msgstr "alias" + +#: apps/note/models/notes.py:218 +msgid "Alias too long." +msgstr "L'alias est trop long." + +#: apps/note/models/notes.py:221 +msgid "An alias with a similar name already exists." +msgstr "Un alias avec un nom similaire existe déjà." + +#: apps/note/models/transactions.py:30 apps/note/models/transactions.py:68 +msgid "amount" +msgstr "montant" + +#: apps/note/models/transactions.py:31 +msgid "in centimes" +msgstr "en centimes" + +#: apps/note/models/transactions.py:39 +msgid "transaction template" +msgstr "modèle de transaction" + +#: apps/note/models/transactions.py:40 +msgid "transaction templates" +msgstr "modèles de transaction" + +#: apps/note/models/transactions.py:64 +msgid "quantity" +msgstr "quantité" + +#: apps/note/models/transactions.py:75 +msgid "reason" +msgstr "raison" + +#: apps/note/models/transactions.py:79 +msgid "valid" +msgstr "valide" + +#: apps/note/models/transactions.py:84 +msgid "transaction" +msgstr "transaction" + +#: apps/note/models/transactions.py:85 +msgid "transactions" +msgstr "transactions" + +#: apps/note/models/transactions.py:118 +msgid "membership transaction" +msgstr "transaction d'adhésion" + +#: apps/note/models/transactions.py:119 +msgid "membership transactions" +msgstr "transactions d'adhésion" + +#: apps/note/views.py:26 +msgid "Transfer money from your account to one or others" +msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres" + +#: note_kfet/settings.py:140 +msgid "English" +msgstr "" + +#: note_kfet/settings.py:141 +msgid "French" +msgstr "" + +#: templates/base.html:14 +msgid "The ENS Paris-Saclay BDE note." +msgstr "" + +#: templates/member/profile_detail.html:12 +msgid "first name" +msgstr "" + +#: templates/member/profile_detail.html:14 +#, fuzzy +#| msgid "name" +msgid "username" +msgstr "nom" + +#: templates/member/profile_detail.html:22 +#, fuzzy +#| msgid "account balance" +msgid "balance" +msgstr "solde du compte" + +#: templates/member/profile_detail.html:26 +msgid "Change password" +msgstr "" + +#: templates/note/transaction_form.html:35 +msgid "Transfer" +msgstr "Virement" + +#: templates/registration/logged_out.html:8 +msgid "Thanks for spending some quality time with the Web site today." +msgstr "" + +#: templates/registration/logged_out.html:9 +msgid "Log in again" +msgstr "" + +#: templates/registration/login.html:7 templates/registration/login.html:8 +#: templates/registration/login.html:22 +#: templates/registration/password_reset_complete.html:10 +msgid "Log in" +msgstr "" + +#: templates/registration/login.html:13 +#, python-format +msgid "" +"You are authenticated as %(username)s, but are not authorized to access this " +"page. Would you like to login to a different account?" +msgstr "" + +#: templates/registration/login.html:23 +msgid "Forgotten your password or username?" +msgstr "" + +#: templates/registration/password_change_done.html:8 +msgid "Your password was changed." +msgstr "" + +#: templates/registration/password_change_form.html:9 +msgid "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" + +#: templates/registration/password_change_form.html:11 +#: templates/registration/password_reset_confirm.html:12 +msgid "Change my password" +msgstr "" + +#: templates/registration/password_reset_complete.html:8 +msgid "Your password has been set. You may go ahead and log in now." +msgstr "" + +#: templates/registration/password_reset_confirm.html:9 +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." +msgstr "" + +#: templates/registration/password_reset_confirm.html:15 +msgid "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." +msgstr "" + +#: templates/registration/password_reset_done.html:8 +msgid "" +"We've emailed you instructions for setting your password, if an account " +"exists with the email you entered. You should receive them shortly." +msgstr "" + +#: templates/registration/password_reset_done.html:9 +msgid "" +"If you don't receive an email, please make sure you've entered the address " +"you registered with, and check your spam folder." +msgstr "" + +#: templates/registration/password_reset_form.html:8 +msgid "" +"Forgotten your password? Enter your email address below, and we'll email " +"instructions for setting a new one." +msgstr "" + +#: templates/registration/password_reset_form.html:11 +msgid "Reset my password" +msgstr "" diff --git a/note_kfet/settings.py b/note_kfet/settings.py index f64d1459..cfe09f7b 100644 --- a/note_kfet/settings.py +++ b/note_kfet/settings.py @@ -10,7 +10,7 @@ from django.utils.translation import gettext_lazy as _ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_DIR = os.path.dirname(os.path.realpath(__file__)) -APPS_DIR = os.path.realpath(os.path.join(BASE_DIR,"apps")) +APPS_DIR = os.path.realpath(os.path.join(BASE_DIR, "apps")) sys.path.append(APPS_DIR) # Quick-start development settings - unsuitable for production @@ -76,7 +76,7 @@ ROOT_URLCONF = 'note_kfet.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR,'templates')], + 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -127,7 +127,7 @@ AUTHENTICATION_BACKENDS = ( 'guardian.backends.ObjectPermissionBackend', ) -ANONYMOUS_USER_NAME = None # Disable guardian anonymous user +ANONYMOUS_USER_NAME = None # Disable guardian anonymous user GUARDIAN_GET_CONTENT_TYPE = 'polymorphic.contrib.guardian.get_polymorphic_base_content_type' @@ -149,6 +149,8 @@ USE_L10N = True USE_TZ = True +LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")] + # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ @@ -158,7 +160,7 @@ USE_TZ = True # Example: "/var/www/example.com/static/" STATIC_ROOT = os.path.realpath(__file__) STATICFILES_DIRS = [ - os.path.join(BASE_DIR,'static')] + os.path.join(BASE_DIR, 'static')] CRISPY_TEMPLATE_PACK = 'bootstrap4' DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html' diff --git a/note_kfet/urls.py b/note_kfet/urls.py index 40b6f3a6..88bb6bb9 100644 --- a/note_kfet/urls.py +++ b/note_kfet/urls.py @@ -14,9 +14,8 @@ urlpatterns = [ path('note/', include('note.urls')), # Include Django Contrib and Core routers - # admin/login/ is redirected to the non-admin login page path('i18n/', include('django.conf.urls.i18n')), - path('accounts/',include('member.urls')), + path('accounts/', include('member.urls')), path('accounts/', include('django.contrib.auth.urls')), path('admin/doc/', include('django.contrib.admindocs.urls')), path('admin/', admin.site.urls), diff --git a/static/css/base.css b/static/css/base.css deleted file mode 100644 index 0407d419..00000000 --- a/static/css/base.css +++ /dev/null @@ -1,17 +0,0 @@ -/* Footer en bas */ -html { - position: relative; - min-height: 100%; -} -body { - margin-bottom: 70px; /* Margin bottom by footer height */ -} -.footer { - position: absolute; - bottom: 0; - width: 100%; - height: 60px; /* Set the fixed height of the footer here */ - line-height: 60px; /* Vertically center the text there */ - background-color: #f5f5f5; -} -/* Affichage des accords dans les interlignes */ diff --git a/static/favicon/android-chrome-192x192.png b/static/favicon/android-chrome-192x192.png new file mode 100644 index 00000000..5b31f298 Binary files /dev/null and b/static/favicon/android-chrome-192x192.png differ diff --git a/static/favicon/android-chrome-512x512.png b/static/favicon/android-chrome-512x512.png new file mode 100644 index 00000000..bb9e4daa Binary files /dev/null and b/static/favicon/android-chrome-512x512.png differ diff --git a/static/favicon/apple-touch-icon.png b/static/favicon/apple-touch-icon.png new file mode 100644 index 00000000..c0b462bd Binary files /dev/null and b/static/favicon/apple-touch-icon.png differ diff --git a/static/favicon/browserconfig.xml b/static/favicon/browserconfig.xml new file mode 100644 index 00000000..49604f0e --- /dev/null +++ b/static/favicon/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/static/favicon/favicon-16x16.png b/static/favicon/favicon-16x16.png new file mode 100644 index 00000000..5db7ed94 Binary files /dev/null and b/static/favicon/favicon-16x16.png differ diff --git a/static/favicon/favicon-32x32.png b/static/favicon/favicon-32x32.png new file mode 100644 index 00000000..a3d9263f Binary files /dev/null and b/static/favicon/favicon-32x32.png differ diff --git a/static/favicon/favicon.ico b/static/favicon/favicon.ico new file mode 100644 index 00000000..53393cda Binary files /dev/null and b/static/favicon/favicon.ico differ diff --git a/static/favicon/mstile-150x150.png b/static/favicon/mstile-150x150.png new file mode 100644 index 00000000..378274c9 Binary files /dev/null and b/static/favicon/mstile-150x150.png differ diff --git a/static/favicon/safari-pinned-tab.svg b/static/favicon/safari-pinned-tab.svg new file mode 100644 index 00000000..a8425e8a --- /dev/null +++ b/static/favicon/safari-pinned-tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/favicon/site.webmanifest b/static/favicon/site.webmanifest new file mode 100644 index 00000000..78fcc75f --- /dev/null +++ b/static/favicon/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/static/favicon/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/static/favicon/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/templates/base.html b/templates/base.html index abfbfb27..5979506b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,60 +1,80 @@ -{% load static %} +{% load static i18n static %} +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} - + - - - -{% block title %}NoteKfet2020{% endblock title %} - - - + + + + + {% block title %}{{ title }}{% endblock title %} - {{ request.site.name }} + + -{% block css %} - - - - -{% endblock %} + {# Favicon #} + + + + + + + + + + + {# Bootstrap CSS #} + + + {% block extracss %}{% endblock %} - -
- +
+
+
+ {% block sidebar %} + {% endblock %}
- -
-
-
- -
-
- {% block content %} +
+ {% block contenttitle %}

{{ title }}

{% endblock %} + {% block content %}

Default content...

- {% endblock content %} - -
+ {% endblock content %}
-
-
-
- NoteKfet2020 - Nous contacter - -

Retour en haut

+
+ +
+
+
+
+
+ + NoteKfet2020 - + Nous contacter - + + {% csrf_token %} + + +
+
+
-
- - {% block javascript %} - - - - - - - - - - - {% endblock javascript %} + +
+{# Bootstrap JavaScript #} + + + +{% block extrajavascript %} +{% endblock extrajavascript %} diff --git a/templates/member/profile_detail.html b/templates/member/profile_detail.html index 11ad6539..ea2f0f07 100644 --- a/templates/member/profile_detail.html +++ b/templates/member/profile_detail.html @@ -1,19 +1,27 @@ {% extends "base.html" %} -{% load static %} -{% block content %} +{% load i18n static %} -
Compte n° {{object.pk}}
- - - - - - - - - - - - -
Nom{{ object.user.name }}
Prénom {{object.user.first_name}}
Pseudo {{object.user.username}}
Aliases{{object.user.note.aliases_set.all }}
Pseudo {{object.user.username}}
Section {{object.section}}
Adresse {{object.address}}
Solde {{object.user.note.balance}}
+{% block content %} +

Compte n° {{ object.pk }}

+ + + +
+
{% trans 'name'|capfirst %}
+
{{ object.user.name }}
+
{% trans 'first name'|capfirst %}
+
{{ object.user.first_name }}
+
{% trans 'username'|capfirst %}
+
{{ object.user.username }}
+
Aliases
+
{{ object.user.note.aliases_set.all }}
+
{% trans 'section'|capfirst %}
+
{{ object.section }}
+
{% trans 'address'|capfirst %}
+
{{ object.address }}
+
{% trans 'balance'|capfirst %}
+
{{ object.user.note.balance }}
+
+ + {% trans 'Change password' %} {% endblock %} diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html index c0c27f47..3b044b7d 100644 --- a/templates/registration/logged_out.html +++ b/templates/registration/logged_out.html @@ -4,12 +4,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - -{% endblock %} - {% block content %}

{% trans "Thanks for spending some quality time with the Web site today." %}

{% trans 'Log in again' %}

diff --git a/templates/registration/login.html b/templates/registration/login.html index 4fa6df5c..04ef8d7d 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -2,16 +2,24 @@ {% comment %} SPDX-License-Identifier: GPL-2.0-or-later {% endcomment %} +{% load i18n crispy_forms_tags %} -{% load i18n %} -{% load crispy_forms_tags %} {% block title %}{% trans "Log in" %}{% endblock %} +{% block contenttitle %}

{% trans "Log in" %}

{% endblock %} {% block content %} -

Login

-
- {% csrf_token %} - {{ form | crispy }} - -
+ {% if user.is_authenticated %} +

+ {% blocktrans trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktrans %} +

+ {% endif %} + +
{% csrf_token %} + {{ form | crispy }} + + {% trans 'Forgotten your password or username?' %} +
{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html index 45edfe02..150a00e9 100644 --- a/templates/registration/password_change_done.html +++ b/templates/registration/password_change_done.html @@ -4,8 +4,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans 'Your password was changed.' %}

{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html index 45edfe02..01133e4c 100644 --- a/templates/registration/password_change_form.html +++ b/templates/registration/password_change_form.html @@ -2,10 +2,12 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - -{% endblock %} +{% block content %} +
{% csrf_token %} +

{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}

+ {{ form | crispy }} + +
+{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index 055244cb..bb91a3c5 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -4,8 +4,9 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "Your password has been set. You may go ahead and log in now." %}

+

+ {% trans 'Log in' %} +

{% endblock %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index edb1ae1e..5db0e810 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -2,10 +2,16 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - +{% block content %} + {% if validlink %} +

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+
{% csrf_token %} + {{ form | crispy }} + +
+ {% else %} +

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

+ {% endif %} {% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html index 055244cb..a215ab93 100644 --- a/templates/registration/password_reset_done.html +++ b/templates/registration/password_reset_done.html @@ -4,8 +4,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}

+

{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}

{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html deleted file mode 100644 index f43d80c3..00000000 --- a/templates/registration/password_reset_email.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load i18n %}{% autoescape off %} -{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} - -{% trans "Please go to the following page and choose a new password:" %} -{% block reset_link %} -{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} -{% endblock %} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} - -{% endautoescape %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index 055244cb..61adaa92 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -2,10 +2,12 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}

+
{% csrf_token %} + {{ form | crispy }} + +
{% endblock %} diff --git a/tox.ini b/tox.ini index dd2f3efe..c8691372 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ deps = pyflakes pylint commands = - flake8 activity member note + flake8 app/activity app/member app/note pylint . [flake8]