Skip to content

Commit

Permalink
updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-gray-tangent committed Jul 19, 2024
1 parent a2f5230 commit 2ad1b59
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
5 changes: 1 addition & 4 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import include, path
from django.utils.translation import gettext_lazy as _

Expand All @@ -32,7 +31,6 @@
path("_health/", views.health, name="health"),
path("", views.home, name="home"),
path("institutions/", views.institutions, name="institutions"),
path("documents/", views.documents, name="documents"),
path("projects/", views.projects, name="projects"),
path("projects/<int:project_id>/", views.project_detail, name="project_detail"),
path("institution/<int:institution_id>/", views.institution_detail, name="institution_detail"),
Expand All @@ -41,8 +39,7 @@
path("subject/<int:pk>/", views.subject_detail, name="subject_detail"),
path("search/", views.search, name="search"),
path("i18n/", include("django.conf.urls.i18n")),
path("accounts/", include("accounts.urls")),
path("accounts/", include("django.contrib.auth.urls")),
path("accounts/", include("accounts.urls"), name="accounts"),
]

if settings.DEBUG:
Expand Down
13 changes: 13 additions & 0 deletions app/templates/accounts/activate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "base.html" %}
{% load static %}
{% load i18n %}

{% block title %}{% trans "Activated" %}{% endblock %}

{% block content %}
<div class="container">
<h1>Account Activated</h1>
<p>Your account has been successfully activated. You can now log in using your credentials.</p>
<a href="{% url 'accounts:login' %}">Login</a>
</div>
{% endblock %}
20 changes: 20 additions & 0 deletions app/templates/accounts/activation_invalid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "base.html" %}
{% load static %}
{% load i18n %}

{% block title %}{% trans "Sign Up" %}{% endblock %}

{% block content %}
<div class="container">
<div class="section mt-3 mb-3">
<div class="card body-card">
<div class="user-account-body">
<h2>Activation Invalid</h2>
<p>Sorry, but the activation link you used is invalid or has expired.</p>
<p>Please request a new activation link or contact support for further assistance.</p>
<a href="{% url 'accounts:accounts_register' %}">Register</a> | <a href="{% url 'accounts:login' %}">Login</a>
</div>
</div>
</div>
</div>
{% endblock %}
22 changes: 22 additions & 0 deletions app/templates/accounts/activation_sent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "base.html" %}
{% load static %}
{% load i18n %}

{% block title %}{% trans "Activation Email Sent" %}{% endblock %}

{% block content %}
<div class="container">
<div class="section mt-3 mb-3">
<div class="card body-card">
<div class="user-account-body">
<h2>Activation Email Sent</h2>
<p>Thank you for registering. An activation email has been sent to your email address.</p>
<p>Please check your email and click on the activation link to activate your account.</p>
<p>If you did not receive the email, please check your spam folder or
<a href="{% url 'accounts:resend_activation' %}">resend the activation email</a>.</p>
<a href="{% url 'accounts:login' %}">Login</a>
</div>
</div>
</div>
</div>
{% endblock %}

0 comments on commit 2ad1b59

Please sign in to comment.