aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriit Laes <plaes@plaes.org>2010-08-06 14:16:34 +0300
committerPriit Laes <plaes@plaes.org>2010-08-06 14:17:53 +0300
commite43285398026212c82f31226f7a0f58f6c1531d1 (patch)
treebffc3440d3a175df3fdbcfee5bce123469eca827
parentMove some account related info into its own separate macro (diff)
downloadgsoc2010-grumpy-e43285398026212c82f31226f7a0f58f6c1531d1.tar.gz
gsoc2010-grumpy-e43285398026212c82f31226f7a0f58f6c1531d1.tar.bz2
gsoc2010-grumpy-e43285398026212c82f31226f7a0f58f6c1531d1.zip
Added website url to configuration
-rw-r--r--conf/grumpy.cfg5
-rw-r--r--grumpy/templates/_userinfo.html2
-rw-r--r--grumpy/templates/email/registration.txt9
3 files changed, 9 insertions, 7 deletions
diff --git a/conf/grumpy.cfg b/conf/grumpy.cfg
index 89c8921..292800b 100644
--- a/conf/grumpy.cfg
+++ b/conf/grumpy.cfg
@@ -12,7 +12,10 @@ SECRET_KEY='Change me'
SQLALCHEMY_ECHO=False
SQLALCHEMY_DATABASE_URI='postgresql://grumpy:grumpy@localhost/grumpy'
-# Grumpy configuration
+## Grumpy configuration
+# URL of website
+GRUMPY_WEBSITE_URL='http://localhost:5000'
+# Default portage directory
GRUMPY_PORTAGE_DIR='/usr/portage'
# Username/password for tinderbox reports
diff --git a/grumpy/templates/_userinfo.html b/grumpy/templates/_userinfo.html
index a9827e7..e0eec2f 100644
--- a/grumpy/templates/_userinfo.html
+++ b/grumpy/templates/_userinfo.html
@@ -3,12 +3,12 @@
<ul>
<li>{{ g.user.email.split('@')[0] | e }}
<li><a href="{{ url_for('logout') }}">Log out</a>
+</ul>
{% if g.user.regtoken -%}
<span class="warning">
Warning: this user account has not yet been confirmed.<br />
Until the account has been confirmed, You won't receive
notifications and cannot add packages to your watch list.
-{# TODO: provide link to "request new token" #}
</span>
{% endif -%}{# g.user.regtoken #}
{% endif -%}{# g.user #}
diff --git a/grumpy/templates/email/registration.txt b/grumpy/templates/email/registration.txt
index 11683f9..f4e05bb 100644
--- a/grumpy/templates/email/registration.txt
+++ b/grumpy/templates/email/registration.txt
@@ -1,7 +1,6 @@
Hey!
-You have signed up on `TODO: site address` but your account is not yet activated.
-You have to follow the following link to finish the registration and
-activate your account:
-
-{{ url_for('confirm_account', email=user.email) }}?token={{ user.regtoken }}
+You have signed up on Gentoo's Grumpy ( {{ config['GRUMPY_WEBSITE_URL']}} ),
+but your account is not yet activated. In order to activate your account,
+please visit the following address:
+{{ config['GRUMPY_WEBSITE_URL']}}{{ url_for('confirm_account', email=user.email) }}?token={{ user.regtoken }}