What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-03 06:21:03
django dynamic pages
# Views.py: from django.shortcuts import get_object_or_404, render def render_items(request, item_name): item = get_object_or_404(YOUR_MODEL, YOUR_ITEM_FIELD_NAME=item_name) return render(request, 'YOUR_TEMPLATE.html', {'item': item }) # Add ... Add solution