From f04ec9aaa2a3f93cfdd12eab88869fb428177017 Mon Sep 17 00:00:00 2001 From: David Rubin Date: Mon, 18 Jan 2010 22:11:50 +0200 Subject: [PATCH 1/8] Added dependancy on turbomail --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index d53c50c..f270bba 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,7 @@ setup( install_requires=[ "Pylons>=0.9.7", "SQLAlchemy>=0.5", + "TurboMail", ], setup_requires=["PasteScript>=1.6.3"], packages=find_packages(exclude=['ez_setup']), From 35ece0ef387d5a9026b60cbb8ca6b5ec295aa797 Mon Sep 17 00:00:00 2001 From: David Rubin Date: Mon, 18 Jan 2010 22:36:02 +0200 Subject: [PATCH 2/8] Moved default user settings to config.ini --- development.ini | 4 ++++ scribeengine/websetup.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/development.ini b/development.ini index db85be5..4b90136 100644 --- a/development.ini +++ b/development.ini @@ -38,6 +38,10 @@ paths.images = %(here)s/images # Themes directory paths.themes = %(here)s/themes +default.user.password = p4ssw0rd +default.user.email = admin@scribeengine.org +default.user.nick = Admin + # Security settings security.salt = secretsalt diff --git a/scribeengine/websetup.py b/scribeengine/websetup.py index cc90443..5e9bd66 100644 --- a/scribeengine/websetup.py +++ b/scribeengine/websetup.py @@ -57,10 +57,10 @@ def setup_app(command, conf, vars): role_admin = Role(name=u'Administrator') role_admin.permissions.extend([perm_addposts, perm_editmyposts, perm_delmyposts]) - password = unicode(hmac.new(conf[u'security.salt'], u'password', + password = unicode(hmac.new(conf[u'security.salt'], conf[u'default.user.password'], hashlib.sha256).hexdigest(), u'utf-8') - user = User(email=u'admin@scribeengine.org', - password=password, nick=u'admin') + user = User(email=conf[u'default.user.email'], + password=password, nick=conf[u'default.user.nick']) user.roles.append(role_admin) Session.add_all([blog_title, blog_slogan, user]) From 75b679b23aab260c1cafa58b6fed313325c955ea Mon Sep 17 00:00:00 2001 From: David Rubin Date: Mon, 18 Jan 2010 22:50:47 +0200 Subject: [PATCH 3/8] Added easier link to new posts, for logged in users. --- scribeengine/templates/base.mako | 1 + 1 file changed, 1 insertion(+) diff --git a/scribeengine/templates/base.mako b/scribeengine/templates/base.mako index 6538cae..59dc1d3 100644 --- a/scribeengine/templates/base.mako +++ b/scribeengine/templates/base.mako @@ -20,6 +20,7 @@
  • ${page.name}
  • % endfor % if c.current_user: +
  • New
  • Logout
  • % else:
  • Login
  • From 8383d724364f906ee0a279a81f506d4ea9048f07 Mon Sep 17 00:00:00 2001 From: David Rubin Date: Mon, 18 Jan 2010 23:15:24 +0200 Subject: [PATCH 4/8] Added links to new blog post for logged in users --- scribeengine/templates/base.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scribeengine/templates/base.mako b/scribeengine/templates/base.mako index 59dc1d3..2ffbed4 100644 --- a/scribeengine/templates/base.mako +++ b/scribeengine/templates/base.mako @@ -6,7 +6,7 @@ ${c.page_title} - +