diff --git a/asuzr/views.py b/asuzr/views.py index 864bfb8..d2b90fb 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 @@ -85,7 +85,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': month_days_values, 'order_list': order_list, 'sum_calls': sum_calls, @@ -107,7 +107,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 bdb9bb8..8528cde 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 645da63..fd9e134 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.date_dd_mm_yy}} {{ attend.date.weekday_name}}{{ attend.attend.calls }}{{ attend.attend.visits }}{% inplace_edit "attend.attend.calls" %}{% inplace_edit "attend.attend.visits" %} {{ attend.orders_count}} {{ attend.orders_price}} {{ attend.designers}}
{{ 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 }}