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

Add next and previous gallery in gallery #55

Open
beudbeud opened this issue May 31, 2016 · 0 comments
Open

Add next and previous gallery in gallery #55

beudbeud opened this issue May 31, 2016 · 0 comments
Labels

Comments

@beudbeud
Copy link
Collaborator

beudbeud commented May 31, 2016

in utils.py

def previous_and_next(some_iterable):
    prevs, items, nexts = tee(some_iterable, 3)
    prevs = chain([None], prevs)
    nexts = chain(islice(nexts, 1, None), [None])
    return izip(prevs, items, nexts)

for work i use this fonction but they not work well because i use it in this loop

for gallery in dirs:

but dirs is not sort by date

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

No branches or pull requests

1 participant