Using fixed data_value instead of adding 256 to its value

This commit is contained in:
Felipe Martín 2013-05-29 18:02:44 +02:00
parent 680de44cdf
commit 45f37ecf2a
3 changed files with 4 additions and 4 deletions

View File

@ -7,13 +7,13 @@
{% for item in page.object_list %}
<div class="span3">
{% if user.is_authenticated %}
<a href="{{ url('items_detail', item.data_value + 256) }}">
<a href="{{ url('items_detail', item.data_value) }}">
{% else %}
<a href="#">
{% endif %}
<div class="well">
<div class="pull-right text-right">
<span class="badge">{{ item.data_value + 256 }}</span>
<span class="badge">{{ item.data_value }}</span>
<h5 class="text-black">{{ item.name() }}</h5>
</div>
<div class="codexicon x4 margin-auto pull-left">

View File

@ -18,7 +18,7 @@
{% endif %}
</div>
<ul>
<li>Data value: {{ item.data_value + 256 }}</li>
<li>Data value: {{ item.data_value }}</li>
</li>
<div class="clearfix"></div>
</div>

View File

@ -73,7 +73,7 @@ def items(request):
def items_detail(request, data_value):
section = 'items'
if request.user.is_authenticated():
item = Item.objects.get(data_value=int(data_value)-256)
item = Item.objects.get(data_value=int(data_value))
data = {
'section': section,
'item': item