Hi,

Are you logged in when creating the swagger docs? Because it will not show
up when not logged in....

Regards,

Andréas

2018-08-05 2:44 GMT+02:00 Fernando Miranda <fndmira...@gmail.com>:

> Andréas, that's exactly what I want, but it does not show up in swagger or
> api docs. Another question I am still is whether by good practices and or
> convensions the restful pattern should I always pass the id in the url to
> detail, or can I do what I am wanting, anyone would know?
>
> Em terça-feira, 31 de julho de 2018 06:03:28 UTC-3, Andréas Kühne escreveu:
>>
>> For the view that I wrote, you won't need an id in the request or on the
>> url at all. It uses the currently logged in user for all of the requests.
>>
>> You will need to pass some kind of token in the request - so that you
>> know which user is logged in.
>>
>> But the url could be something like this:
>>
>> urlpatterns = [
>>   path('/profile', views.UserProfileChangeAPIView.as_view(),
>> name='profile'),
>> ]
>>
>> That way the /profile url would be used for the view.
>>
>> Regards,
>>
>> Andréas
>>
>> 2018-07-30 17:35 GMT+02:00 Jason <jjohn...@gmail.com>:
>>
>>> its not a url, its a http verb.  rely on those for API requests.
>>>
>>> and it would be a user ID for that request.  if you're using oauth
>>> tokens, that should be handled in your view authenticator, not the view
>>> itself
>>>
>>> --
>>> 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 https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/c36b4a7e-3c53-4805-9e45-35e22eb20357%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/c36b4a7e-3c53-4805-9e45-35e22eb20357%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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> 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/ffa8dcc5-1d52-4c71-b811-40c9b16c4042%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ffa8dcc5-1d52-4c71-b811-40c9b16c4042%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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/CAK4qSCdi8aG3FDq4%3Dyuz5dS_cYJLE7CxO4W9yP4SScc8zASykw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to