Hi,

Please check that link
<https://docs.djangoproject.com/en/1.11/topics/http/urls/#how-django-processes-a-request>
of documentation.
For me it was very helpful to understand all pieces of Request/Response
cycle.

Regards,
Constantine C.

On Fri, May 12, 2017 at 4:05 PM, nickeforos <[email protected]> wrote:

> I'm following the django tutorials and documentaion as well as the django
> book.
> In
> https://docs.djangoproject.com/en/1.11/topics/http/views/
> there is this view function:
> def current_datetime(request):
>     now = datetime.datetime.now()
>     html = "<html><body>It is now %s.</body></html>" % now
>     return HttpResponse(html)
>
> and in:
> http://djangobook.com/django-views-dynamic-content/http://
> djangobook.com/django-views-dynamic-content/
> there is this view function:
> def hours_ahead(request, offset):
>     try:
>         offset = int(offset)
>     except ValueError:
>         raise Http404()
>     dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
>     html = "In %s hour(s), it will be  %s." % (offset, dt)
>     return HttpResponse(html)
>
> So in the view function I can pass *request* as well as an *argument*
> from the url but how does the signature of a view function look like?
> Where can I find it in the documentation?
> Is it possible to see such signatures in PyCharm?
>
> --
> 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/76227b4e-5de3-4ca1-a9c6-658c2ee69529%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/76227b4e-5de3-4ca1-a9c6-658c2ee69529%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sincerely yours,
Constantine C

-- 
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/CAK52boW61cxycptG65aRnuH4fN5vg4_0vXKv4nvpvAn1xLNd9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to