Hi,
You can't do that. Django URL configs are URLS that are routed to views
withing Django and you can't define url that would access external sources.
To access external sources you have to do that in your endpoint API to
call remote resource, for example by using requests library.
On 25.1.2018 5.48, tapha kebe wrote:
Hi,
i'm trying to get my data from an external api (example:
https:api.test.com/consumers). And i would like to know, if i have to
build the extenal Api URL in my urls.py like this:
|
url(r'^(?P<api.test.com/consumers)>[0-9]+)$/', views.get, name="get"),
|
or you have any other good idea?
Thanks
--
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto: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/264cbb11-8f02-4730-926f-8e0ab9150fc8%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/264cbb11-8f02-4730-926f-8e0ab9150fc8%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jani Tiainen
--
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/4a48fe6c-ec88-6353-1955-9e1e55c96605%40gmail.com.
For more options, visit https://groups.google.com/d/optout.