On woensdag 14 februari 2018 16:14:40 CET Lylio wrote:
> I'd like to click on one of the items in the list and open up a new page
> showing all the database details for that particular list item (title,
> description, time of creation, etc). Roughly, would I change the list items
> into links:
>
> <ul>
> {% for card in cards.all %}
> <li class="card"><a href='card.html/get(this_object_id)>{{
> card.title }}</a></li>
>
> {% endfor %}
> </ul>
>
>
> Then there would be a new view defined, something like
>
> def card(request):
> object = get(this_object_id)
> context = {'cards': object}
> return render(request, 'scrumbuddy/card.html', context)
>
> On Tuesday, 13 February 2018 14:18:25 UTC, Gonzalo Delgado wrote:
> > I can assure you using Django for a project like yours is *very*
> > straightforward.
> > When in doubt, revisit the Django tutorial. This part is a good one for
> > where you're at: https://docs.djangoproject.com/en/2.0/intro/tutorial03/
You did not follow this advice, or you would already know how to tie the url
to the primary key of a model instance. It is spelled out there in detail.
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/2451736.7695DCAJNb%40fritzbook.
For more options, visit https://groups.google.com/d/optout.