view templates/snippet/snippet_box.djhtml @ 207:d534881629ff

Updated snippet's template and views files to fix rating code collision which prevented posting new snippets. Updated snippet's models file so that now secret id of each snippet will be unique. It also means that the no two or more than two snippets will have same secret id.
author Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
date Mon, 19 Aug 2013 20:30:19 +0500
parents a4f88ac85837
children b3c3d940cc87
line wrap: on
line source

{% autoescape off %}

<div class="snippet {{ default_style }}">
{%  if  show   %}

    <div class="code-lines">
        {% for line in lines %}
        <p class="line" id="l{{ forloop.counter }}">{% if line %}{{ line }}{% else %}&nbsp;{% endif %}</p>
        {% endfor %}
    </div>
    <div class="line-counters"></div>
</div>
{%  else %}
    <div class="code-lines">
        

<p class="hint">  You need to register first if you want to see the content. Register for a new account or log in. </p>
</div>
</div>
{% endif %}
{% endautoescape %}