Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
use django settings for api root
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelButkovic committed Feb 3, 2016
1 parent b5f1eac commit a4f05cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bulbs/campaigns/templatetags/campaign_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import datetime

from django import template
from django.conf import settings
from django.utils.dateparse import parse_datetime

import requests
Expand All @@ -15,7 +16,7 @@ def campaign_pixels(*args, **kwargs):
property_id = kwargs['property']

params = {'campaign': campaign_id, 'property': property_id}
response = requests.get('http://www.tunic.theonion.com/api/v1/pixels', params=params)
response = requests.get(settings.TUNIC_API_URL+'/pixels', params=params)

valid_pixels = []

Expand Down
2 changes: 2 additions & 0 deletions example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@
}
}
}

TUNIC_API_URL = 'http://tunic.local/api/v1'

0 comments on commit a4f05cb

Please sign in to comment.