clicking the list_display link open a new page with the result of my queryset

14 views
Skip to first unread message

Ricardo Kamada

unread,
Nov 6, 2013, 5:15:39 PM11/6/13
to django...@googlegroups.com
Hi, I'm trying to do in list_display
a link to open in new tab list_display with results of my queryset.
that way I get this error reverse

Reverse for 'evento.views.lista' with arguments '(<Evento: EVENT CITY 01>,)' and keyword arguments '{}' not found.

Could someone help me?
I do not understand why this error because I call the view and pass the argument to the filter queryset but I get this error.
Ricardo

Tom Evans

unread,
Nov 6, 2013, 5:30:26 PM11/6/13
to django...@googlegroups.com
You haven't shown the url in question, which makes it hard to answer.

At a guess, the url specifies a %d parameter, you are passing it an
object. Pass it self.evento.id

Cheers

Tom
> --
> 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 django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJTdXTGNtZWmzsC7btxOLDymNr18hBpj8FxvSZDiAZ9uELevVA%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Ricardo

unread,
Nov 6, 2013, 5:48:07 PM11/6/13
to django...@googlegroups.com, teva...@googlemail.com
Hi
the file full url like this
I just try to pass the id as said but still did not work.
the error is this
NoReverseMatch at / admin / event / incricaoevento /
Reverse for 'evento.views.lista' with arguments '(1)' and keyword arguments '{}' not found.

Now I do not know if you're calling the view correctly, if the error is in reverse ("evento.views.lista", args = [self.evento.id]) or something that gotta do with get_url the admin.

Ricardo Kamada

unread,
Nov 6, 2013, 7:10:45 PM11/6/13
to django...@googlegroups.com, teva...@googlemail.com
I got :)
was missing url
url (r '^ list / (? <id> P \ d +) / $', 'evento.views.lista', name = 'list')

Thanks to all

Ricardo


2013/11/6 Ricardo <ricard...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/m9OwGZRMurk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages