Using fixed data_value instead of adding 256 to its value
This commit is contained in:
parent
680de44cdf
commit
45f37ecf2a
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue