diff --git a/note_adherents/__init__.py b/adherents/__init__.py similarity index 100% rename from note_adherents/__init__.py rename to adherents/__init__.py diff --git a/adherents/locale/fr/LC_MESSAGES/django.po b/adherents/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..cad278eb --- /dev/null +++ b/adherents/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-07-08 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" + +#: models.py:26 +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:35 models.py:36 +msgid "user profile" +msgstr "profil utilisateur" + +#: models.py:52 +msgid "date" +msgstr "date" + +#: models.py:57 +msgid "amount" +msgstr "montant" + +#: models.py:61 +msgid "membership fee" +msgstr "cotisation" + +#: models.py:62 +msgid "membership fees" +msgstr "cotisations" diff --git a/adherents/migrations/0001_initial.py b/adherents/migrations/0001_initial.py new file mode 100644 index 00000000..9b0992c9 --- /dev/null +++ b/adherents/migrations/0001_initial.py @@ -0,0 +1,43 @@ +# Generated by Django 2.2.3 on 2019-07-08 11:48 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Profile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('phone_number', models.CharField(max_length=255, verbose_name='phone number')), + ('section', models.CharField(help_text='e.g. "1A0", "9A♥", "SAPHIRE"', max_length=255, verbose_name='section')), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'user profile', + 'verbose_name_plural': 'user profile', + }, + ), + migrations.CreateModel( + name='MembershipFee', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField(max_length=255, verbose_name='date')), + ('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='amount')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'membership fee', + 'verbose_name_plural': 'membership fees', + }, + ), + ] diff --git a/note_adherents/tests/__init__.py b/adherents/migrations/__init__.py similarity index 100% rename from note_adherents/tests/__init__.py rename to adherents/migrations/__init__.py diff --git a/note_adherents/models.py b/adherents/models.py similarity index 82% rename from note_adherents/models.py rename to adherents/models.py index b3034ed4..850e91da 100644 --- a/note_adherents/models.py +++ b/adherents/models.py @@ -41,25 +41,25 @@ class Profile(models.Model): class MembershipFee(models.Model): """ - TODO + User can become member by paying a membership fee """ user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.PROTECT, ) - date = models.CharField( + date = models.DateField( max_length=255, - verbose_name=_('phone number'), + verbose_name=_('date'), ) - amount = models.CharField( - max_length=255, - verbose_name=_('section'), - help_text=_('e.g. "1A0", "9A♥", "SAPHIRE"'), + amount = models.DecimalField( + max_digits=5, # Max 999.99 € + decimal_places=2, + verbose_name=_('amount'), ) class Meta: - verbose_name = _('user profile') - verbose_name_plural = _('user profile') + verbose_name = _('membership fee') + verbose_name_plural = _('membership fees') def __str__(self): return self.user.get_username() diff --git a/note_theme/__init__.py b/adherents/tests/__init__.py similarity index 100% rename from note_theme/__init__.py rename to adherents/tests/__init__.py diff --git a/note_kfet/settings.py b/note_kfet/settings.py index d2f94e49..8db700a3 100644 --- a/note_kfet/settings.py +++ b/note_kfet/settings.py @@ -31,7 +31,10 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ - 'note_theme', + # Theme overrides Django Admin templates + 'theme', + + # Django contrib 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', @@ -40,6 +43,9 @@ INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', + + # Note apps + 'adherents', ] MIDDLEWARE = [ diff --git a/note_theme/tests/__init__.py b/theme/__init__.py similarity index 100% rename from note_theme/tests/__init__.py rename to theme/__init__.py diff --git a/note_theme/locale/fr/LC_MESSAGES/django.po b/theme/locale/fr/LC_MESSAGES/django.po similarity index 71% rename from note_theme/locale/fr/LC_MESSAGES/django.po rename to theme/locale/fr/LC_MESSAGES/django.po index 0a74fa30..4163a3da 100644 --- a/note_theme/locale/fr/LC_MESSAGES/django.po +++ b/theme/locale/fr/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-30 16:26+0200\n" +"POT-Creation-Date: 2019-07-08 13:45+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -13,7 +13,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: templates/admin/base_site.html:22 templates/base.html:48 +#: templates/admin/base_site.html:22 msgid "Welcome," msgstr "" @@ -22,7 +22,6 @@ msgid "View site" msgstr "Retour au site" #: templates/admin/base_site.html:32 templates/admin/base_site.html:51 -#: templates/base.html:52 msgid "View admin" msgstr "Administration" @@ -30,15 +29,10 @@ msgstr "Administration" msgid "Documentation" msgstr "" -#: templates/admin/base_site.html:53 templates/base.html:56 +#: templates/admin/base_site.html:53 msgid "Log out" msgstr "" -#: templates/base.html:62 templates/registration/login.html:9 -#: templates/registration/login.html:56 -msgid "Log in" -msgstr "" - #: templates/registration/logged_out.html:9 #: templates/registration/password_change_done.html:9 #: templates/registration/password_change_form.html:9 @@ -49,25 +43,6 @@ msgstr "" msgid "Home" msgstr "" -#: templates/registration/login.html:14 -msgid "Please correct the error below." -msgstr "" - -#: templates/registration/login.html:15 -msgid "Please correct the errors below." -msgstr "" - -#: templates/registration/login.html:31 -#, 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:52 -msgid "Forgotten your password?" -msgstr "Mot de passe oublié ?" - #: templates/registration/password_change_done.html:9 #: templates/registration/password_change_form.html:9 msgid "Password change" diff --git a/note_theme/static/css/admin.css b/theme/static/css/admin.css similarity index 100% rename from note_theme/static/css/admin.css rename to theme/static/css/admin.css diff --git a/note_theme/static/favicon/android-chrome-192x192.png b/theme/static/favicon/android-chrome-192x192.png similarity index 100% rename from note_theme/static/favicon/android-chrome-192x192.png rename to theme/static/favicon/android-chrome-192x192.png diff --git a/note_theme/static/favicon/android-chrome-512x512.png b/theme/static/favicon/android-chrome-512x512.png similarity index 100% rename from note_theme/static/favicon/android-chrome-512x512.png rename to theme/static/favicon/android-chrome-512x512.png diff --git a/note_theme/static/favicon/apple-touch-icon.png b/theme/static/favicon/apple-touch-icon.png similarity index 100% rename from note_theme/static/favicon/apple-touch-icon.png rename to theme/static/favicon/apple-touch-icon.png diff --git a/note_theme/static/favicon/browserconfig.xml b/theme/static/favicon/browserconfig.xml similarity index 100% rename from note_theme/static/favicon/browserconfig.xml rename to theme/static/favicon/browserconfig.xml diff --git a/note_theme/static/favicon/favicon-16x16.png b/theme/static/favicon/favicon-16x16.png similarity index 100% rename from note_theme/static/favicon/favicon-16x16.png rename to theme/static/favicon/favicon-16x16.png diff --git a/note_theme/static/favicon/favicon-32x32.png b/theme/static/favicon/favicon-32x32.png similarity index 100% rename from note_theme/static/favicon/favicon-32x32.png rename to theme/static/favicon/favicon-32x32.png diff --git a/note_theme/static/favicon/favicon.ico b/theme/static/favicon/favicon.ico similarity index 100% rename from note_theme/static/favicon/favicon.ico rename to theme/static/favicon/favicon.ico diff --git a/note_theme/static/favicon/mstile-150x150.png b/theme/static/favicon/mstile-150x150.png similarity index 100% rename from note_theme/static/favicon/mstile-150x150.png rename to theme/static/favicon/mstile-150x150.png diff --git a/note_theme/static/favicon/safari-pinned-tab.svg b/theme/static/favicon/safari-pinned-tab.svg similarity index 100% rename from note_theme/static/favicon/safari-pinned-tab.svg rename to theme/static/favicon/safari-pinned-tab.svg diff --git a/note_theme/static/favicon/site.webmanifest b/theme/static/favicon/site.webmanifest similarity index 100% rename from note_theme/static/favicon/site.webmanifest rename to theme/static/favicon/site.webmanifest diff --git a/note_theme/templates/admin/base_site.html b/theme/templates/admin/base_site.html similarity index 100% rename from note_theme/templates/admin/base_site.html rename to theme/templates/admin/base_site.html diff --git a/note_theme/templates/registration/logged_out.html b/theme/templates/registration/logged_out.html similarity index 100% rename from note_theme/templates/registration/logged_out.html rename to theme/templates/registration/logged_out.html diff --git a/note_theme/templates/registration/password_change_done.html b/theme/templates/registration/password_change_done.html similarity index 100% rename from note_theme/templates/registration/password_change_done.html rename to theme/templates/registration/password_change_done.html diff --git a/note_theme/templates/registration/password_change_form.html b/theme/templates/registration/password_change_form.html similarity index 100% rename from note_theme/templates/registration/password_change_form.html rename to theme/templates/registration/password_change_form.html diff --git a/note_theme/templates/registration/password_reset_complete.html b/theme/templates/registration/password_reset_complete.html similarity index 100% rename from note_theme/templates/registration/password_reset_complete.html rename to theme/templates/registration/password_reset_complete.html diff --git a/note_theme/templates/registration/password_reset_confirm.html b/theme/templates/registration/password_reset_confirm.html similarity index 100% rename from note_theme/templates/registration/password_reset_confirm.html rename to theme/templates/registration/password_reset_confirm.html diff --git a/note_theme/templates/registration/password_reset_done.html b/theme/templates/registration/password_reset_done.html similarity index 100% rename from note_theme/templates/registration/password_reset_done.html rename to theme/templates/registration/password_reset_done.html diff --git a/note_theme/templates/registration/password_reset_email.html b/theme/templates/registration/password_reset_email.html similarity index 100% rename from note_theme/templates/registration/password_reset_email.html rename to theme/templates/registration/password_reset_email.html diff --git a/note_theme/templates/registration/password_reset_form.html b/theme/templates/registration/password_reset_form.html similarity index 100% rename from note_theme/templates/registration/password_reset_form.html rename to theme/templates/registration/password_reset_form.html diff --git a/theme/tests/__init__.py b/theme/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/note_theme/tests/test_templates.py b/theme/tests/test_templates.py similarity index 100% rename from note_theme/tests/test_templates.py rename to theme/tests/test_templates.py