Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding a bunch of templates and controls for account creation.

Working towards having user authentication for issue #10.
  • Loading branch information...
commit 81b987311a6aab2fdc2a6552c1d54bc24fedd1e5 1 parent 6ef7f96
@Dylnuge Dylnuge authored
View
5 settings.py.example
@@ -66,6 +66,11 @@ SECRET_KEY = '1'
# Account activation time limit
ACCOUNT_ACTIVATION_DAYS = 7
+# Login page info
+LOGIN_REDIRECT_URL = '/'
+LOGIN_URL = '/login'
+LOGOUT_URL = '/logout'
+
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
View
9 treasureapp/templates/registration/activate.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}Treasure Chest{% endblock %}
+
+{% block content %}
+
+<h1>Account activation failed.</h1>
+
+{% endblock %}
View
9 treasureapp/templates/registration/activation_complete.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}Treasure Chest{% endblock %}
+
+{% block content %}
+
+<h1>Account activation completed successfully.</h1>
+
+{% endblock %}
View
3  treasureapp/templates/registration/activation_email.txt
@@ -0,0 +1,3 @@
+Welcome to Treasure Chest!
+
+To activate your account please visit http://localhost:8000/activate/{{activation_key}}.
View
1  treasureapp/templates/registration/activation_email_subject.txt
@@ -0,0 +1 @@
+Activate your account with Treasure Chest
View
9 treasureapp/templates/registration/registration_complete.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}Treasure Chest{% endblock %}
+
+{% block content %}
+
+<h1>Account created successfully.</h1>
+
+{% endblock %}
View
18 treasureapp/templates/registration/registration_form.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+{% load bootstrap %}
+
+{% block title %}Treasure Chest | Create Account{% endblock %}
+
+{% block content %}
+
+<form class="well" method="post">
+ {% csrf_token %}
+ {{ form|bootstrap }}
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" class="btn btn-primary">Sign Up</button>
+ </div>
+ </div>
+</form>
+
+{% endblock %}
View
2  urls.py
@@ -25,6 +25,8 @@
)
urlpatterns += patterns('',
+ # Registration controls
+ (r'^', include('registration.backends.default.urls')),
# Administration controls
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
Please sign in to comment.
Something went wrong with that request. Please try again.