On Friday, 12 May 2017 15:11:55 UTC+1, nickeforos wrote: > > Thanks for the link. I understand these examples but still I would like to > see how a view function is defined. > > I also would like to see it in PyCharm. When I click on a view function in > PyCharm I only see: > > def myview_function(request) > Inferred type: (request: Any) -> HttpResponse > > I would expect to see something like this: > view_function(request, *args, **kwargs) > > I've also looked in django's source but I cannot locate it. >
But this isn't how Python works. You don't need a defined signature or prototype for a class of functions. A view is simply called with the request and any parameters passed from the URL, that's all there is to it. -- DR. -- 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/ec6a2b04-dc19-4a72-aac6-74b20dd3e730%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

