Definition of url:

*def url(regex, view, kwargs=None, name=None):*

I also found this:
*def view(request, *args, **kwargs):*

here:

*.../django/views/generic/base.py*


On Sat, May 13, 2017 at 11:15 PM, Daniel Roseman <[email protected]>
wrote:

> 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
> <https://groups.google.com/d/msgid/django-users/ec6a2b04-dc19-4a72-aac6-74b20dd3e730%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAH-drox%3DrPnXLTjFbJhkDVBdr-%2BKQTiGoNLj%2BDWOKr5-PK6W9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to