Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate request handlers #24

Open
skyl opened this issue Nov 10, 2015 · 0 comments
Open

Consolidate request handlers #24

skyl opened this issue Nov 10, 2015 · 0 comments

Comments

@skyl
Copy link

skyl commented Nov 10, 2015

Instead of having a different view for year, keyword, etc, I think it would make more since to filter by the querystring. So, we could see all of the papers from eg 2014 that are tagged curcumin and antifungal with say /publications/?year=2014&keyword=curcumin&keyword=antifungal&plain=yes. Currently this particular query is not possible on the frontend. This kind of search would be well suited for a querystring instead of url parameters. Moving all of this logic into a single view would be a significant cleanup, only once would we have to state, for instance:

    if 'plain' in request.GET:
        return render_to_response('publications/publications.txt', {
                'publications': publications
            }, context_instance=RequestContext(request), content_type='text/plain; charset=UTF-8')

And, a few redundant templates could probably go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant