Удалена устаревшая логика адресов клиентов

Исправлена ошибка 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:
2025-11-11 17:04:20 +03:00
parent 8cc8cd1339
commit 0973121b39
3 changed files with 4 additions and 43 deletions

View File

@@ -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)