Save snipt on render to re-render with linenos

master
Nick Sergeant 2012-07-23 10:05:56 -04:00
parent 04b7549e52
commit 05c64e1c0c
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ def detail(request, username, snipt_slug):
snipt = get_object_or_404(Snipt, user__username=username, slug=snipt_slug)
user = snipt.user
if 'linenos' not in snipt.stylized:
snipt.save()
if user != request.user:
if not snipt.public:
if 'key' not in request.GET: