diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-11-03 09:25:22 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-11-03 09:25:22 +0200 |
commit | 920bda8b69d2f2c078d369fe25684c437c50e40f (patch) | |
tree | ce7886a78524d39c0a146045df91098cd914368c | |
parent | 31ad3792ab44c7a1f3c66f54488b5e716c23990a (diff) | |
download | Servo-920bda8b69d2f2c078d369fe25684c437c50e40f.tar.gz Servo-920bda8b69d2f2c078d369fe25684c437c50e40f.tar.bz2 Servo-920bda8b69d2f2c078d369fe25684c437c50e40f.zip |
Use url name instead of view
-rwxr-xr-x | install.py | 4 | ||||
-rwxr-xr-x | servo/templates/notes/view_note.html | 4 | ||||
-rwxr-xr-x | servo/templates/orders/remove_product.html | 2 | ||||
-rw-r--r-- | servo/views/order.py | 2 |
4 files changed, 6 insertions, 6 deletions
@@ -77,7 +77,7 @@ subj = "/C=%s/ST=%s/L=%s/O=%s/OU=%s/CN=%s" % ( ) call(['openssl', 'req', '-nodes', '-x509', '-newkey', 'rsa:2048', - '-days', '365', '-subj', subj, - '-keyout', 'servo.key', '-out', 'servo.crt']) + '-days', '365', '-subj', subj, + '-keyout', 'servo.key', '-out', 'servo.crt']) print("Your Servo installation is ready for action at https://%s" % args['hostname']) 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: |