Your error message is pretty clear. Change a little bit your urls.py to
take pk keywords like this:

path("events/<int:pk>/",getEvents,name = "getEvents"),



On Mon, 14 Oct 2019 at 07:53, Kasper Laudrup <[email protected]> wrote:

> Hi Leb Dev,
>
> On 14/10/2019 08.28, leb dev wrote:
> >
> > once i tried to perform the task the system crash and display:
> >
> >     getEvents() got unexpected keyword argument "id >
>
> That error message is pretty clear. Look at your getEvents() function.
> It doesn't take a keyword argument, while in your urls.py:
>
> >
> > |path("events/<int:id>/",getEvents,name ="getEvents"),|
> >
>
> You are calling getEvents() with a keyword argument named id, as the
> error message states. Change your getEvents() function to accept id as a
> keyword argument instead of the pid positional argument.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/013776f5-a699-3ab2-d7af-81616f5783de%40stacktrace.dk
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE4dFh1Dc0sGN4dyDYZ09BKh8tuoiaP6QOZQvExv%3Djwf0YNtxg%40mail.gmail.com.

Reply via email to