Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mediatek/site-interludes
  • aeltheos/site-kwei
  • mediatek/site-kwei
3 results
Show changes
Commits on Source (12)
......@@ -12,16 +12,6 @@
<a class="button" href="{% url 'profile' %}">Annuler</a>
</div>
</form>
<h2>Changer mon mot de passe</h2>
<form method="post" action="{% url 'accounts:change_password' %}">
{% csrf_token %}
{{ password_form.as_html }}
<br>
<div class="flex">
<input type="submit" value="Valider">
<a class="button" href="{% url 'profile' %}">Annuler</a>
</div>
</form>
<h2> Mot de Passe </h2>
<a href ="{% url 'account_reset_password'% }" rel="text/html"> Réinitialisez votre mot de passe. </a>
{% endblock %}
......@@ -5,16 +5,5 @@ from accounts import views
app_name = "accounts"
urlpatterns = [
path("login/", views.LoginView.as_view(), name="login"),
path("logout/", views.LogoutView.as_view(), name="logout"),
path("create/", views.CreateAccountView.as_view(), name="create"),
path("update/", views.UpdateAccountView.as_view(), name="update"),
path("change_password/", views.UpdatePasswordView.as_view(), name="change_password"),
path('activate/<uidb64>/<token>/', views.ActivateAccountView.as_view(), name='activate'),
path("password_reset/", views.ResetPasswordView.as_view(), name="password_reset"),
path(
"password_reset/<uidb64>/<token>/",
views.ResetPasswordConfirmView.as_view(),
name="password_reset_confirm"
),
]
......@@ -82,7 +82,8 @@ class ActivitySubmissionForm(FormRenderMixin, forms.ModelForm):
"available_sunday_afternoon",
"constraints",
"status", "needs",
#"status",
"needs",
"comments",
)
......
# Generated by Django 3.2.15 on 2022-08-21 13:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='activitymodel',
name='status',
field=models.CharField(blank=True, choices=[('P', 'En présentiel uniquement'), ('D', 'En distanciel uniquement'), ('2', 'Les deux')], default='P', max_length=1, verbose_name='Présentiel/distanciel'),
),
migrations.AlterField(
model_name='participantmodel',
name='school',
field=models.CharField(choices=[('C', 'ENS Paris-Saclay'), ('E', 'Extérieur')], max_length=1, verbose_name='ENS Paris-Saclay ou extérieur'),
),
]
{% extends "base.html" %}
\ No newline at end of file
......@@ -71,7 +71,7 @@
Mon compte
</a>
{% else %}
<a href="{% url 'accounts:login' %}"
<a href="{% url 'account_login' %}"
class="{% block nav_login %}{% endblock %}">
Connexion
</a>
......@@ -105,7 +105,11 @@
{% block "content" %}
{% endblock %}
{% block content %}
{% endblock %}
</main>
{% block extra_body %}
{% endblock %}
<footer>
<div id="sponsors">
......
......@@ -21,6 +21,12 @@
{% csrf_token %}
<p>{{ form.school.label_tag }} {{ form.school }}</p>
<p>{{ form.meal_friday_evening.label_tag }} {{ form.meal_friday_evening }} </p>
<p>{{ form.meal_saturday_morning.label_tag }} {{ form.meal_saturday_morning }} </p>
<p>{{ form.meal_saturday_midday.label_tag }} {{ form.meal_saturday_midday }}</p>
<p>{{ form.meal_saturday_evening.label_tag }} {{ form.meal_saturday_evening }} </p>
<p>{{ form.meal_sunday_morning.label_tag }} {{ form.meal_sunday_morning}} </p>
<p>{{ form.meal_sunday_midday.label_tag }} {{ form.meal_sunday_midday }}</p>
<p>Vous êtes considéré⋅e commme extérieur si vous n'êtes pas actuellement scolarisé⋅e ou inscrit⋅e à l'ENS Paris-Saclay. Nous avons besoin de cette information pour transmettre la liste des extérieurs à l'administration de l'ENS.</p>
......@@ -36,8 +42,6 @@
<p>Si vous vous inscrivez à une activité qui nécessite préparation, nous communiquerons
votre email aux orgas pour qu'iels puissent vous contacter.
</p>
{% if formset.non_form_errors %}
{{ formset.non_form_errors }}
{% endif %}
......
......@@ -4,9 +4,8 @@
{% block "content" %}
<h2>Inscriptions</h2>
<p>Vous devez être connecté pour pouvoir vous inscrire à des activités. Pour vous inscrire à l'événement en lui même, suivez le lien HelloAsso sur la <a href="{% url 'home' %}">page d'accueil</a></p>
<p>Aller à la page de <a href="{% url 'accounts:login' %}">connexion</a> pour vous connecter
ou à celle de <a href="{% url 'accounts:create' %}">création de compte</a> si vous n'avez pas de compte.</p>
<p>Vous devez être connecté pour pouvoir vous inscrire à des activités.
<p>Aller à la page de <a href="{% url 'account_login' %}">connexion</a> pour vous connecter ou créer un compte.
{% if settings.inscriptions_end %}
<p>Les inscriptions seront ouvertes jusqu'au {{ settings.inscriptions_end|date:"l d F Y à H:i" }})</p>
{% endif %}
......
......@@ -102,7 +102,7 @@
{% endif %}
<a class="button" href="{% url 'accounts:update' %}">Modifier mes informations</a>
<a class="button" href="{% url 'accounts:logout' %}">Déconnexion</a>
<a class="button" href="{% url 'account_logout' %}">Déconnexion</a>
</div>
{% endblock %}
......@@ -37,6 +37,8 @@ def import_secret(name):
except AttributeError:
raise RuntimeError("Secret missing: {}".format(name))
SITE_ID=1
SECRET_KEY = import_secret("SECRET_KEY")
DB_NAME = import_secret("DB_NAME")
......@@ -56,7 +58,7 @@ EMAIL_USE_SSL = True
DEBUG = True
# FIXME - set hosts in production
ALLOWED_HOSTS = ["127.0.0.1", "kwei-dev.crans.org"]
ALLOWED_HOSTS = ["127.0.0.1", "localhost","kwei-dev.crans.org"]
if DEBUG:
# This will display emails in Console.
......@@ -84,12 +86,19 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sitemaps',
'django.contrib.sites',
'home.apps.HomeConfig',
'admin_pages.apps.AdminPagesConfig',
'accounts.apps.AccountsConfig',
'site_settings.apps.SiteSettingsConfig',
'shared.apps.SharedConfig',
# allauth support.
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth_note_kfet',
]
MIDDLEWARE = [
......@@ -138,6 +147,7 @@ DATABASES = {
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
# Password validation
......@@ -145,6 +155,19 @@ AUTHENTICATION_BACKENDS = (
AUTH_USER_MODEL = 'accounts.EmailUser'
AUTH_PROFILE_MODULE = 'home.ParticipantModel'
# Tell oauth how the user is configured.
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_AUTHENTICATION_METHOD = "email"
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
SOCIALACCOUNT_PROVIDERS = {
'notekfet': {
'DOMAIN': 'note-dev.crans.org', # À remplacer si nécessaire
# 'SCOPE': ['1_1'], # Adapter les scopes demandées (par défaut lecture des champs utilisateur⋅rice)
},
}
AUTH_PASSWORD_VALIDATORS = [
{ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', },
......@@ -159,7 +182,7 @@ SESSION_COOKIE_AGE = 3600
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'fr-fr'
LANGUAGE_CODE = 'fr'
TIME_ZONE = 'CET'
......
......@@ -21,5 +21,7 @@ from django.conf.urls.static import static
urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('comptes/', include('allauth.urls')),
path('', include('home.urls')),
]
Django~=3.2.7
django-allauth~=0.51.0
\ No newline at end of file
let
pkgs = import <nixpkgs> {};
in pkgs.mkShell {
buildInputs = [
pkgs.python3
pkgs.python39Packages.django
pkgs.python39Packages.pip
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}
\ No newline at end of file