Added run script
This commit is contained in:
parent
a8a9510c62
commit
c842c6d039
1
run-server
Executable file
1
run-server
Executable file
@ -0,0 +1 @@
|
|||||||
|
/home/raoul/VirtualEnv/ScribeEngine/tags/bin/paster serve development.ini --reload
|
@ -64,7 +64,7 @@ class Flash(object):
|
|||||||
def teaser(text, url):
|
def teaser(text, url):
|
||||||
position = text.find(u'</p>')
|
position = text.find(u'</p>')
|
||||||
if position > 0:
|
if position > 0:
|
||||||
return text[:position]
|
return text[:position + 4]
|
||||||
elif len(text) > 300:
|
elif len(text) > 300:
|
||||||
text = text[:297]
|
text = text[:297]
|
||||||
position = len(text) - 1
|
position = len(text) - 1
|
||||||
@ -81,11 +81,11 @@ def teaser(text, url):
|
|||||||
def url_for_post(post):
|
def url_for_post(post):
|
||||||
#TODO: this is hard coded.
|
#TODO: this is hard coded.
|
||||||
return url_for(
|
return url_for(
|
||||||
controller='blog',
|
controller='blog',
|
||||||
action='view',
|
action='view',
|
||||||
year=post.created.strftime('%Y'),
|
year=post.created.strftime('%Y'),
|
||||||
month=post.created.strftime('%m'),
|
month=post.created.strftime('%m'),
|
||||||
day=post.created.strftime('%d'),
|
day=post.created.strftime('%d'),
|
||||||
url=post.url
|
url=post.url
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ def generate_url(title):
|
|||||||
``title``
|
``title``
|
||||||
The title of the blog post.
|
The title of the blog post.
|
||||||
"""
|
"""
|
||||||
return re.sub(r'[^a-zA-Z0-9]+', u'-', title.lower())
|
return re.sub(r'[^a-zA-Z0-9]+', u'-', title.lower()).strip()
|
||||||
|
|
||||||
def hash_password(password):
|
def hash_password(password):
|
||||||
"""
|
"""
|
||||||
|
@ -200,7 +200,6 @@ hr {
|
|||||||
|
|
||||||
#comments,
|
#comments,
|
||||||
#respond {
|
#respond {
|
||||||
/*font-size: 1.5em;*/
|
|
||||||
margin-top: 1.8em;
|
margin-top: 1.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user