Добавлено редактирование полей модели.
Для корректного использования необходимо установить пакет django-inplaceedit:
sudo pip install django-inplaceedit
После установки пакета его необходимо доавить в INSTALLED_APPS в settings.py:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'inplaceeditform',
'asuzr',
)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{% load inplace_edit %}
|
||||
<TABLE BORDER WIDTH="100%">
|
||||
{% if attend_list %}
|
||||
<ul>
|
||||
@@ -13,8 +14,8 @@
|
||||
<TR bgcolor={{attend.day_color}}>
|
||||
<TD>{{ attend.date_dd_mm_yy}}</TD>
|
||||
<TD>{{ attend.week_day}}</TD>
|
||||
<TD>{{ attend.calls }}</TD>
|
||||
<TD>{{ attend.visits }}</TD>
|
||||
<TD>{% inplace_edit "attend.calls" %}</TD>
|
||||
<TD>{% inplace_edit "attend.visits" %}</TD>
|
||||
<TD><a href="{% url 'asuzr-main' attend.date.day attend.date.month attend.date.year %}">{{ attend.order_count}}</a></TD>
|
||||
<TD>{{ attend.orders_price}}</TD>
|
||||
</TR>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{% load inplace_edit %}
|
||||
<html>
|
||||
<head>
|
||||
<title>Автоматическая система учета заказов студии мебели Рекорд</title>
|
||||
<script src="{{ STATIC_URL }}admin/js/jquery.min.js" type="text/javascript"></script>
|
||||
{% inplace_static %}
|
||||
</head>
|
||||
<body>
|
||||
{% block menu %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "asuzr/base.html" %}
|
||||
{% load inplace_edit %}
|
||||
|
||||
{% block title %}{% if archive %} Архивная таблица заказов {% else %} Таблица выхода заказов {% endif %}{% endblock %}
|
||||
|
||||
@@ -27,10 +28,10 @@
|
||||
<TR>
|
||||
<TD>{{ order.date_dmy }}</TD>
|
||||
<TD>{{ order.deadline_dmy }}</TD>
|
||||
<TD>{{ order.product.name }}</TD>
|
||||
<TD>{% inplace_edit "order.product.name" %}</TD>
|
||||
<TD>{%if order.delivery%} Да {% else %} Нет {% endif %} </TD>
|
||||
<TD>{%if order.lifting%} Да {% else %} Нет {% endif %}</TD>
|
||||
<TD>{{ order.address }}</TD>
|
||||
<TD>{% inplace_edit "order.address" %}</TD>
|
||||
<TD>{{ order.price }}</TD>
|
||||
<TD>{{ order.paid }}</TD>
|
||||
<TD>{{ order.ostatok }}</TD>
|
||||
|
||||
Reference in New Issue
Block a user