Skip to content

Commit

Permalink
[2375] Move dumps_url variables into package controller
Browse files Browse the repository at this point in the history
This might not be the place for it but it's better than having it in
the template.
  • Loading branch information
aron committed May 14, 2012
1 parent b949494 commit 423396b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ckan/controllers/package.py
Expand Up @@ -173,6 +173,10 @@ def pager_url(q=None, page=None):

c.search_url_params = urlencode(_encode_params(params_nopage))

# Extracted from package/search.html template.
c.dumps_url = config.get('ckan.dumps_url')
c.dumps_format = config.get('ckan.dumps_format', '')

This comment has been minimized.

Copy link
@aron

aron May 14, 2012

Author Contributor

Not 100% sure these should be here, but they were inline in the template which is worse.


try:
c.fields = []
search_extras = {}
Expand Down

1 comment on commit 423396b

@tobes
Copy link
Contributor

@tobes tobes commented on 423396b May 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aron

config is in the template vars so you can just use${config.get('lalala')} in the template without changing the controller

Please sign in to comment.