aboutsummaryrefslogtreecommitdiffstats
path: root/servo
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-11-03 09:25:22 +0200
committerFilipp Lepalaan <filipp@mac.com>2016-11-03 09:25:22 +0200
commit920bda8b69d2f2c078d369fe25684c437c50e40f (patch)
treece7886a78524d39c0a146045df91098cd914368c /servo
parent31ad3792ab44c7a1f3c66f54488b5e716c23990a (diff)
downloadServo-920bda8b69d2f2c078d369fe25684c437c50e40f.tar.gz
Servo-920bda8b69d2f2c078d369fe25684c437c50e40f.tar.bz2
Servo-920bda8b69d2f2c078d369fe25684c437c50e40f.zip
Use url name instead of view
Diffstat (limited to 'servo')
-rwxr-xr-xservo/templates/notes/view_note.html4
-rwxr-xr-xservo/templates/orders/remove_product.html2
-rw-r--r--servo/views/order.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/servo/templates/notes/view_note.html b/servo/templates/notes/view_note.html
index 8f51406..01118cf 100755
--- a/servo/templates/notes/view_note.html
+++ b/servo/templates/notes/view_note.html
@@ -30,9 +30,9 @@
{% endfor %}
<div class="form-actions">
<div class="pull-right">
- <a href="{% url 'servo.views.order.create' note_id=note.id %}" class="btn {% if note.order.id %} disabled {% endif %}">{% trans "Create Order" %}</a>
+ <a href="{% url 'orders-create_with_note' note_id=note.id %}" class="btn {% if note.order.id %} disabled {% endif %}">{% trans "Create Order" %}</a>
<a href="{% url 'notes-delete_note' note.id %}" class="btn btn-danger" data-modal="#modal">{% trans "Delete" %}</a>
- <a href="{% url 'servo.views.note.edit' parent=note.id %}" class="btn btn-primary">{% trans "Reply" %}</a>
+ <a href="{% url 'notes-reply' parent=note.id %}" class="btn btn-primary">{% trans "Reply" %}</a>
</div>
</div>
{% endblock view_message %}
diff --git a/servo/templates/orders/remove_product.html b/servo/templates/orders/remove_product.html
index e6d2966..3aacb2b 100755
--- a/servo/templates/orders/remove_product.html
+++ b/servo/templates/orders/remove_product.html
@@ -10,7 +10,7 @@
{% endblock body %}
{% block footer %}
-<form action="{% url 'servo.views.order.remove_product' order.id item.id %}" method="post">
+<form action="{% url 'orders-remove_product' order.id item.id %}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
</form>
diff --git a/servo/views/order.py b/servo/views/order.py
index 145e1f7..39ecb4c 100644
--- a/servo/views/order.py
+++ b/servo/views/order.py
@@ -788,7 +788,7 @@ def report_device(request, pk, device_id):
@permission_required('servo.change_order')
def remove_product(request, pk, item_id):
- order = Order.objects.get(pk=pk)
+ order = get_object_or_404(Order, pk=pk)
# The following is to help those who hit Back after removing a product
try: