Commits

Anonymous committed 755c090

Added very basic templates, settings, and urlsauto for plug-n-play integration.

  • Participants
  • Parent commits 1efeb21

Comments (0)

Files changed (9)

File registration/settings.py

+from settings_post import *
+
+try:
+    ACCOUNT_ACTIVATION_DAYS
+except:
+    ACCOUNT_ACTIVATION_DAYS = 30

File registration/templates/activate.html

+{% extends "base.html" %}
+{% block title %}{% if account %}Activation successful{% else %}Activation failed :({% endif %}{% endblock %}
+
+{% block content %}
+{% if account %}
+  <h1>Activation successful</h1>
+  <p>Congratulations, {{account.username}}. Your account has been created successfully.</p>
+{% else %}
+  <h1>Activation failed :(</h1>
+  <p>Sorry, there were problems with the activation. Please make sure that the activation link was opened correctly in your Browser. Please be also aware that activation links expire automatically.</p>
+{% endif %}
+{% endblock content %}

File registration/templates/activation_email.txt

+Hi!
+In order to activate your account please visit the following link:
+
+http://{{site}}/accounts/activate/{{activation_key}}/
+
+Thanks,
+Your {{site}} team

File registration/templates/activation_email_subject.txt

+Activation of your {{site}} account

File registration/templates/login.html

+{% extends "base.html" %}
+{% block title %}Login{% endblock %}
+
+{% block content %}
+<h1>Login</h1>
+<form action="{{ request.get_full_path }}" method="post">
+  <table>{{ form }}</table>
+  <input type="submit" value="Login" />
+</form>
+{% endblock content %}

File registration/templates/logout.html

+{% extends "base.html" %}
+{% block title %}Logged out{% endblock %}
+
+{% block content %}
+<h1>Logged out</h1>
+<p>You've successfully logged out.</p>
+{% endblock content %}

File registration/templates/registration_complete.html

+{% extends "base.html" %}
+{% block title %}Registration successful{% endblock %}
+
+{% block content %}
+<h1>Registration successful</h1>
+<p>The registration was successful. In order to activate your account please check your email and click on the activation link.</p>
+{% endblock content %}
+ 

File registration/templates/registration_form.html

+{% extends "base.html" %}
+{% block title %}Register{% endblock %}
+
+{% block content %}
+<h1>Register</h1>
+<form action="{{ request.path }}" method="post">
+  <table>{{ form }}</table>
+  <input type="submit" value="Register" />
+</form>
+{% endblock content %}

File registration/urlsauto.py

+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+    (r'^account/', include('registration.urls')),
+)