--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+<p>{% trans "Account activation failed" %}</p>
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Your account is now activated." %}</p>
+{% endblock %}
--- /dev/null
+{% load i18n %}
+{% trans "Activate account at" %} {{ site.name }}:
+
+http://{{ site.domain }}{% url 'registration_activate' activation_key %}
+
+{% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %}
--- /dev/null
+{% load i18n %}{% trans "Account activation on" %} {{ site.name }}
{% extends "base.html" %}
+{% load i18n %}
{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
-{% if form.errors %}
- <p>Invalid credentials</p>
-{% endif %}
-
-<form method="post" action="{% url 'login' %}">
-{% csrf_token %}
-<table>
-<tr>
- <td>{{ form.username.label_tag }}</td>
- <td>{{ form.username }}</td>
-</tr>
-<tr>
- <td>{{ form.password.label_tag }}</td>
- <td>{{ form.password }}</td>
-</tr>
-</table>
-
-<input type="submit" value="login" />
-<input type="hidden" name="next" value="{{ next }}" />
+ <input type="submit" value="{% trans 'Log in' %}" />
+ <input type="hidden" name="next" value="{{ next }}" />
</form>
-{% endblock %}
\ No newline at end of file
+<p>{% trans "Forgot password" %}? <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a>!</p>
+<p>{% trans "Not member" %}? <a href="{% url 'registration_register' %}">{% trans "Register" %}</a>!</p>
+{% endblock %}
-<!DOCTYPE html>
-<html>
-<head>
- <title></title>
-</head>
-<body>
-hejeczka
-</body>
-</html>
\ No newline at end of file
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Logged out" %}</p>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Password changed" %}</p>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+<p>{% trans "Password reset successfully" %}</p>
+
+<p><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></p>
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% if validlink %}
+
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+
+{% else %}
+
+<p>{% trans "Password reset failed" %}</p>
+
+{% endif %}
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Email with password reset instructions has been sent." %}</p>
+{% endblock %}
--- /dev/null
+{% load i18n %}
+{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
+{% endblock %}
--- /dev/null
+{% load i18n %}
+{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
+{% endblock %}
+
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+ <p>{% trans "Registration is currently closed." %}</p>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "You are now registered. Activation email sent." %}</p>
+{% endblock %}
\ No newline at end of file
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
"""
import os
+from django.core.mail import send_mail
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ALLOWED_HOSTS = ["ha1.chem.univ.gda.pl"]
+ACCOUNT_ACTIVATION_DAYS = 2 # two days
# Application definition
'django_simple.authentication',
'django_simple.todo',
'django_simple.directory',
+ 'registration',
]
MIDDLEWARE_CLASSES = [
LOGIN_URL = '/login/'
MEDIA_ROOT = './'
+EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
+#EMAIL_USE_TLS = True
+#EMAIL_PORTS = 587
+#EMAIL_HOST = 'smtp.localhost'
+#EMAIL_HOST_USER = 'admin@localhost'
+#EMAIL_HOST_PASSWORD = 'yourPassword'
+SERVER_EMAIL = 'admin@ha1.chem.univ.gda.pl'
+DEFAULT_FROM_EMAIL = 'UNRES server Admin <admin@ha1.chem.univ.gda.pl>'
+
+LOGIN_REDIRECT_URL = '/'
\ No newline at end of file
Lab. of Simul. of Polym. & Lab. of Mol. Model, Faculty of Chemistry, University of Gdansk
<br>
- Ver.24.08.2017 <span class="fa fa-envelope-o"></span>
+ Ver.08.09.2017 <span class="fa fa-envelope-o"></span>
cezary.czaplewski<span class="fa fa-at"></span>ug.edu.pl
<div class="user-name">
url(r'^', include(authentication_urls)),
url(r'^myfiles/', include(directory_urls)),
url(r'^admin/', include(admin.site.urls)),
+ url(r'^accounts/', include('registration.backends.hmac.urls')),
]