summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grandlyon_cartads_cs/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/grandlyon_cartads_cs/models.py b/grandlyon_cartads_cs/models.py
index d5b4d62..a6280a1 100644
--- a/grandlyon_cartads_cs/models.py
+++ b/grandlyon_cartads_cs/models.py
@@ -60,9 +60,9 @@ class GLCartaDSCS(AbstractCartaDSCS):
# served directly and have to be copied to a different server :/
return super(AbstractCartaDSCS, self).soap_client(**kwargs)
- def fix_pdf_url(self, url):
- # fixup URL for recette environment, another patch will be required for production...
- return url.replace('http://ads-rec.grandlyon.fr/', 'http://api-rec.grandlyon.com/ads-rec-portail/')
+ def get_cerfa_pdf(self, url):
+ url = url.replace('http://ads-rec.grandlyon.fr/', 'https://api-rec.grandlyon.com/ads-rec/')
+ return self.requests.get(url, auth=HttpBearerAuth(self.get_api_manager_token()))
def get_api_manager_token(self, renew=False):
cache_key = 'cartads-%s-token' % self.id