csrf_cookie_name = string(default='mediagoblin_csrftoken')
# Push stuff
-push_url = string(default='')
+push_urls = string_list(default=list())
[storage:publicstore]
storage_class = string(default="mediagoblin.storage.filestorage:BasicFileStorage")
# re-raise the exception
raise
- if mg_globals.app_config["push_url"]:
+ if mg_globals.app_config["push_urls"]:
feed_url=request.urlgen(
'mediagoblin.user_pages.atom_feed',
qualified=True,user=request.user.username)
hubparameters = {
'hub.mode': 'publish',
'hub.url': feed_url}
- huburl = mg_globals.app_config["push_url"]
hubdata = urllib.urlencode(hubparameters)
- hubheaders = {"Content-type": "application/x-www-form-urlencoded"}
- hubrequest = urllib2.Request(huburl, hubdata,hubheaders)
- hubresponse = urllib2.urlopen(hubrequest)
+ hubheaders = {
+ "Content-type": "application/x-www-form-urlencoded",
+ "Connection": "close"}
+ for huburl in mg_globals.app_config["push_urls"]:
+ hubrequest = urllib2.Request(huburl, hubdata,hubheaders)
+ hubresponse = urllib2.urlopen(hubrequest)
add_message(request, SUCCESS, _('Woohoo! Submitted!'))
'rel': 'alternate',
'type': 'text/html'
}];
- if mg_globals.app_config["push_url"]:
- atomlinks.append({
- 'rel': 'hub',
- 'href': mg_globals.app_config["push_url"]})
+ if mg_globals.app_config["push_urls"]:
+ for push_url in mg_globals.app_config["push_urls"]:
+ atomlinks.append({
+ 'rel': 'hub',
+ 'href': push_url})
feed = AtomFeed(
"MediaGoblin: Feed for user '%s'" % request.matchdict['user'],