Удалена устаревшая логика адресов клиентов
Исправлена ошибка AttributeError при создании нового клиента. Адреса теперь привязаны к заказам, а не к клиентам. - Удалено обращение к customer.addresses в customer_detail view - Убрана секция "Адреса доставки" из шаблона customer_detail.html - Исправлена команда create_demo_orders для работы с новой структурой 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -79,11 +79,9 @@ def customer_list(request):
|
||||
def customer_detail(request, pk):
|
||||
"""Детали клиента"""
|
||||
customer = get_object_or_404(Customer, pk=pk)
|
||||
addresses = customer.addresses.all()
|
||||
|
||||
|
||||
context = {
|
||||
'customer': customer,
|
||||
'addresses': addresses,
|
||||
}
|
||||
return render(request, 'customers/customer_detail.html', context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user