0

I'm developing a django web-project and I'm going to develop its IOS and Android API. Is there a way to avoid using hardcoded url addresses in the app code?Something like django url name system

The following problem faces me if there isn't any solution to my question:

If I want to change some of my urls, I should change the app code and also all the previous installed apps on peoples' devices won't work and should be updated.

kianoosh
  • 610
  • 6
  • 22

1 Answers1

0

The way I see it, you probably have two options:

a) Code very generic forwarding links into your app, such as:

http://www.example.com?linkid=1

http://www.example.com?linkid=2

You can then, from your side, forward these on to where you need them to go by using the query string ID number.

b) Write a web service to push updated URLs to your app, maybe on load so you're not polling the service all the time.

How often are the URLs likely to change?

HenrikV
  • 401
  • 1
  • 4
  • 6