Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add <div> around all snippets with their ID.

  • Loading branch information...
commit 2ff5ad1cc14eaefe72237fb4819570ca9781c52a 1 parent 5c285cd
@Osmose Osmose authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  apps/homesnippets/views.py
View
3  apps/homesnippets/views.py
@@ -51,7 +51,8 @@ def view_snippets(request, **kwargs):
if len(snippets) == 0:
out_txt = ''
else:
- out = [snippet['body'] for snippet in snippets]
+ out = ['<div data-snippet-id="%s">%s</div>' %
+ (snippet['id'], snippet['body']) for snippet in snippets]
out.append('<!-- content generated at %s -->' %
(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime())))
Please sign in to comment.
Something went wrong with that request. Please try again.