diff --git a/asuzr/views.py b/asuzr/views.py index 5ab78f3..b6ce6bf 100644 --- a/asuzr/views.py +++ b/asuzr/views.py @@ -1,6 +1,6 @@ from django.shortcuts import render from django.http import HttpResponse -from django.template import Context, loader +from django.template import RequestContext, Context, loader from asuzr.models import Product from asuzr.models import Attendance from asuzr.models import Order @@ -57,7 +57,7 @@ def main(request, day, month, year): d_date = p_date.strftime("%d/%m/%Y") t = loader.get_template('asuzr/attend_order.html') - c = Context({ + c = RequestContext(request,{ 'attend_list': filtered_attend_list, 'order_list': order_list, 'sum_calls': sum_calls, @@ -79,7 +79,7 @@ def orders (request, archive): order_list = Order.objects.filter(is_done=is_done_value).order_by('-id') t=loader.get_template('asuzr/orders.html') - c=Context({ + c=RequestContext(request, { 'order_list': order_list, 'archive': is_done_value, }) diff --git a/record/urls.py b/record/urls.py index 46242db..dfca360 100644 --- a/record/urls.py +++ b/record/urls.py @@ -13,4 +13,5 @@ urlpatterns = patterns('', url(r'^orders/(?P\d+)/$', 'asuzr.views.orders'), url(r'^desreport/$', 'asuzr.views.desreport'), url(r'^admin/', include(admin.site.urls)), + url(r'^inplaceeditform/', include('inplaceeditform.urls')), ) diff --git a/templates/asuzr/attendance.html b/templates/asuzr/attendance.html index 0a58694..82a17f5 100644 --- a/templates/asuzr/attendance.html +++ b/templates/asuzr/attendance.html @@ -1,3 +1,4 @@ +{% load inplace_edit %} {% if attend_list %} - - + + diff --git a/templates/asuzr/base.html b/templates/asuzr/base.html index 0a8e361..bc0e969 100644 --- a/templates/asuzr/base.html +++ b/templates/asuzr/base.html @@ -1,6 +1,9 @@ +{% load inplace_edit %} Автоматическая система учета заказов студии мебели Рекорд + + {% inplace_static %} {% block menu %} diff --git a/templates/asuzr/orders.html b/templates/asuzr/orders.html index 67acb00..f60f8fa 100644 --- a/templates/asuzr/orders.html +++ b/templates/asuzr/orders.html @@ -1,4 +1,5 @@ {% extends "asuzr/base.html" %} +{% load inplace_edit %} {% block title %}{% if archive %} Архивная таблица заказов {% else %} Таблица выхода заказов {% endif %}{% endblock %} @@ -27,10 +28,10 @@ - + - +
{{ attend.date_dd_mm_yy}} {{ attend.week_day}}{{ attend.calls }}{{ attend.visits }}{% inplace_edit "attend.calls" %}{% inplace_edit "attend.visits" %} {{ attend.order_count}} {{ attend.orders_price}}
{{ order.date_dmy }} {{ order.deadline_dmy }}{{ order.product.name }}{% inplace_edit "order.product.name" %} {%if order.delivery%} Да {% else %} Нет {% endif %} {%if order.lifting%} Да {% else %} Нет {% endif %}{{ order.address }}{% inplace_edit "order.address" %} {{ order.price }} {{ order.paid }} {{ order.ostatok }}