diff --git a/.bzrignore b/.bzrignore new file mode 100644 index 0000000..669ccfe --- /dev/null +++ b/.bzrignore @@ -0,0 +1,6 @@ +data +.eric4project +ScribeEngine.e4p +scribeengine.sqlite +posts.sql +*.egg-info diff --git a/ScribeEngine.egg-info/PKG-INFO b/ScribeEngine.egg-info/PKG-INFO deleted file mode 100644 index 3a976cd..0000000 --- a/ScribeEngine.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: ScribeEngine -Version: 0.1dev -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/ScribeEngine.egg-info/SOURCES.txt b/ScribeEngine.egg-info/SOURCES.txt deleted file mode 100644 index c0490b3..0000000 --- a/ScribeEngine.egg-info/SOURCES.txt +++ /dev/null @@ -1,34 +0,0 @@ -MANIFEST.in -README.txt -setup.cfg -setup.py -ScribeEngine.egg-info/PKG-INFO -ScribeEngine.egg-info/SOURCES.txt -ScribeEngine.egg-info/dependency_links.txt -ScribeEngine.egg-info/entry_points.txt -ScribeEngine.egg-info/not-zip-safe -ScribeEngine.egg-info/paster_plugins.txt -ScribeEngine.egg-info/requires.txt -ScribeEngine.egg-info/top_level.txt -scribeengine/__init__.py -scribeengine/websetup.py -scribeengine/config/__init__.py -scribeengine/config/deployment.ini_tmpl -scribeengine/config/environment.py -scribeengine/config/middleware.py -scribeengine/config/routing.py -scribeengine/controllers/__init__.py -scribeengine/controllers/error.py -scribeengine/lib/__init__.py -scribeengine/lib/app_globals.py -scribeengine/lib/base.py -scribeengine/lib/helpers.py -scribeengine/model/__init__.py -scribeengine/model/meta.py -scribeengine/public/bg.png -scribeengine/public/favicon.ico -scribeengine/public/index.html -scribeengine/public/pylons-logo.gif -scribeengine/tests/__init__.py -scribeengine/tests/test_models.py -scribeengine/tests/functional/__init__.py \ No newline at end of file diff --git a/ScribeEngine.egg-info/dependency_links.txt b/ScribeEngine.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/ScribeEngine.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ScribeEngine.egg-info/entry_points.txt b/ScribeEngine.egg-info/entry_points.txt deleted file mode 100644 index 7839909..0000000 --- a/ScribeEngine.egg-info/entry_points.txt +++ /dev/null @@ -1,7 +0,0 @@ - - [paste.app_factory] - main = scribeengine.config.middleware:make_app - - [paste.app_install] - main = pylons.util:PylonsInstaller - \ No newline at end of file diff --git a/ScribeEngine.egg-info/not-zip-safe b/ScribeEngine.egg-info/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/ScribeEngine.egg-info/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ScribeEngine.egg-info/paster_plugins.txt b/ScribeEngine.egg-info/paster_plugins.txt deleted file mode 100644 index c24c7fe..0000000 --- a/ScribeEngine.egg-info/paster_plugins.txt +++ /dev/null @@ -1,2 +0,0 @@ -PasteScript -Pylons diff --git a/ScribeEngine.egg-info/requires.txt b/ScribeEngine.egg-info/requires.txt deleted file mode 100644 index b6f774b..0000000 --- a/ScribeEngine.egg-info/requires.txt +++ /dev/null @@ -1,2 +0,0 @@ -Pylons>=0.9.7 -SQLAlchemy>=0.5 \ No newline at end of file diff --git a/ScribeEngine.egg-info/top_level.txt b/ScribeEngine.egg-info/top_level.txt deleted file mode 100644 index 43ae899..0000000 --- a/ScribeEngine.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -scribeengine diff --git a/scribeengine/controllers/post.py b/scribeengine/controllers/post.py index 37d0204..cba2b1f 100644 --- a/scribeengine/controllers/post.py +++ b/scribeengine/controllers/post.py @@ -42,7 +42,10 @@ class PostController(BaseController): @authenticate(u'Edit My Posts') def edit(self, id=None): - c.page_title = 'New Post' + if id is None: + h.redirect_to('/post/new') + c.post = Session.query(Post).get(id) + c.page_title = 'Edit Post: %s' % c.post.title return render(u'/post/edit.mako') def edit_POST(self, id=None): diff --git a/scribeengine/lib/base.py b/scribeengine/lib/base.py index 1ac180b..58e1521 100644 --- a/scribeengine/lib/base.py +++ b/scribeengine/lib/base.py @@ -227,7 +227,7 @@ def authenticate(permission=None): session[u'redirect_url'] = request.environ[u'PATH_INFO'] session.save() h.flash.set_message(u'You need to be logged in to do that.', u'error') - h.redirect_to('/login') + h.redirect_to('/admin/login') return decorator(validate) diff --git a/scribeengine/templates/post/edit.mako b/scribeengine/templates/post/edit.mako new file mode 100644 index 0000000..45ad3c8 --- /dev/null +++ b/scribeengine/templates/post/edit.mako @@ -0,0 +1,21 @@ +<%inherit file="/base.mako"/> +
+

Edit Post: ${c.post.title}

+ <%include file="/errors.mako"/> +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
diff --git a/themes/stargazer/public/styles/style.css b/themes/stargazer/public/styles/style.css index b1a42b2..780526f 100644 --- a/themes/stargazer/public/styles/style.css +++ b/themes/stargazer/public/styles/style.css @@ -32,7 +32,7 @@ h3 { font-size: 1em; } -p, ul, ol { +p, ul, ol, pre { margin-top: 1.8em; line-height: 180%; } @@ -186,6 +186,14 @@ hr { margin-left: 1em; } +.post pre { + background-color: #191919; + border: 1px solid #333333; + font-family: Monaco, Lucida Typewriter, Courier New, monospace; + margin-bottom: 0.5em; + padding: 0.3em 0.5em; +} + /* Sidebar */ #sidebar {