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 %}
|
{% for item in page.object_list %}
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<a href="{{ url('items_detail', item.data_value + 256) }}">
|
<a href="{{ url('items_detail', item.data_value) }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="#">
|
<a href="#">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="well">
|
<div class="well">
|
||||||
<div class="pull-right text-right">
|
<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>
|
<h5 class="text-black">{{ item.name() }}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="codexicon x4 margin-auto pull-left">
|
<div class="codexicon x4 margin-auto pull-left">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Data value: {{ item.data_value + 256 }}</li>
|
<li>Data value: {{ item.data_value }}</li>
|
||||||
</li>
|
</li>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -73,7 +73,7 @@ def items(request):
|
||||||
def items_detail(request, data_value):
|
def items_detail(request, data_value):
|
||||||
section = 'items'
|
section = 'items'
|
||||||
if request.user.is_authenticated():
|
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 = {
|
data = {
|
||||||
'section': section,
|
'section': section,
|
||||||
'item': item
|
'item': item
|
||||||
|
|
Loading…
Reference in New Issue