Skip to content
Browse files

long long ago

  • Loading branch information...
1 parent e54e5e1 commit 0ecbe13298c52743c0bda1950467388597c355c1 @fuzzy-id committed May 3, 2012
View
1 development.ini
@@ -11,6 +11,7 @@ pyramid.includes = pyramid_debugtoolbar
pyramid_tm
sqlalchemy.url = mysql://test_user:D3v3L0p3R@localhost/testing
+credentials = wp_frontend/tests/passwd.py
[server:main]
use = egg:waitress#main
View
1 wp_frontend/__init__.py
@@ -36,6 +36,7 @@ def main(global_config, sql_init_function=initialize_sql, **settings):
config.add_route('view_status', '/status')
config.add_route('new_backup_template', '/backup/new_template')
config.add_route('view_backup', '/backup/{template}')
+ config.add_route('edit_backup', '/backup/{template}/edit')
config.add_route('view_login', '/login')
config.add_route('view_logout', '/logout')
View
56 wp_frontend/templates/backup.pt
@@ -6,31 +6,51 @@
</tal:block>
</tal:block>
<tal:block metal:fill-slot="main">
- <tal:block metal:use-macro="blocks.macros['block-wo-header']">
+ <tal:block metal:use-macro="blocks.macros['block-with-header']">
+ <tal:block metal:fill-slot="header">Name</tal:block>
<tal:block metal:fill-slot="body">
- <tal:block metal:use-macro="blocks.macros['block-with-header']">
- <tal:block metal:fill-slot="header">Name</tal:block>
- <tal:block metal:fill-slot="body">
- <p>${template.name}</p>
+ <p>${template.name}</p>
+ </tal:block>
+ </tal:block>
+ <tal:block metal:use-macro="blocks.macros['block-with-header']">
+ <tal:block metal:fill-slot="header">Root</tal:block>
+ <tal:block metal:fill-slot="body">
+ <p>${template.root}</p>
+ </tal:block>
+ </tal:block>
+ <tal:block metal:use-macro="blocks.macros['block-with-header']">
+ <tal:block metal:fill-slot="header">Excludes</tal:block>
+ <tal:block metal:fill-slot="body">
+ <ul>
+ <tal:block tal:repeat="exclude template.excludes.split(',')">
+ <li>${exclude}</li>
</tal:block>
- </tal:block>
- <tal:block metal:use-macro="blocks.macros['block-with-header']">
- <tal:block metal:fill-slot="header">Root</tal:block>
+ </ul>
+ </tal:block>
+ </tal:block>
+ <div class="line">
+ <div class="unity size1of2">
+ <tal:block metal:use-macro="blocks.macros['block-wo-header']">
<tal:block metal:fill-slot="body">
- <p>${template.root}</p>
+ <p>
+ <a href="${request.route_path('edit_backup', template=template.name)}">
+ Edit this Template
+ </a>
+ </p>
</tal:block>
</tal:block>
- <tal:block metal:use-macro="blocks.macros['block-with-header']">
- <tal:block metal:fill-slot="header">Excludes</tal:block>
+ </div>
+ <div class="unity size1of2 lastUnit">
+ <tal:block metal:use-macro="blocks.macros['block-wo-header']">
<tal:block metal:fill-slot="body">
- <ul>
- <tal:block tal:repeat="exclude template.excludes.split(',')">
- <li>${exclude}</li>
- </tal:block>
- </ul>
+ <p>
+ <a href="${request.route_path('edit_backup', template=template.name)}">
+ Make and Download Backup
+ </a>
+ </p>
</tal:block>
</tal:block>
- </tal:block>
- </tal:block>
+ </div>
+ </div>
</tal:block>
</html>
View
2 wp_frontend/templates/login.pt
@@ -3,7 +3,7 @@
<tal:block metal:fill-slot="title">Login</tal:block>
<tal:block metal:fill-slot="main">
<div class="line">
- <div class="unity size1of5">
+ <div class="unity size2of5">
<tal:block metal:use-macro="blocks.macros['block-with-header']">
<tal:block metal:fill-slot="header">Login</tal:block>
<tal:block metal:fill-slot="body">
View
10 wp_frontend/tests/test_status.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+from pyramid import testing
+
+from wp_frontend.compat import unittest
+
+class BackupTests(unittest.TestCase):
+
+ def test_backup_is_complete(self):
+ pass
View
5 wp_frontend/views/status.py
@@ -67,3 +67,8 @@ def new_backup_template(request):
'form': forms.backup_form.render(),
'resources': forms.form_resources(forms.backup_form),
}
+
+@view_config(route_name="edit_backup", permission='user',
+ renderer='wp_frontend:templates/backup_edit.pt')
+def edit_backup_template(request):
+ pass

0 comments on commit 0ecbe13

Please sign in to comment.
Something went wrong with that request. Please try again.