Is there an easy way to change out-of-box links for views and routers?
For example, in urls.py:
from rest_framework import viewsets, routers
...
class Activity_TypeViewSet(viewsets.ModelViewSet):
model = Activity_Type
...
router.register(r'activity_types', Activity_TypeViewSet)
...
url(r'^', include(router.urls)),
This sets the url structure as:
{"activity_types": "http://odd.quantdevgroup.com/activity_types/"}
The question boils down to how easy it is to make a link:
{"activity_types": "**https**://odd.quantdevgroup.com/activity_types/"}
If I disabled http / port 80 and allowed only https / port 443, then my application needs to manually add https to the link after it cannot open http (because I disabled port 80).
source
share