gallery.py: Handle query and path separately for ._url()
authorW. Trevor King <wking@tremily.us>
Mon, 9 Dec 2013 05:59:47 +0000 (21:59 -0800)
committerW. Trevor King <wking@tremily.us>
Mon, 9 Dec 2013 05:59:47 +0000 (21:59 -0800)
commitbc0fdb6b0a080a081e6347f3f22f0a0eb0c56a1f
tree7c6dba339a2f8e52219cc74e26fd9ea7acf07faf
parent80f7bce68f7db63967c101f1442dabedcbef3005
gallery.py: Handle query and path separately for ._url()

This avoids computing a relpath for:

  /full/path/to/gallery?pp=2

from a base-path of:

  /full/path/to/gallery

and getting:

  ../gallery?pp=2

instead of the expected:

  ?pp=2

We could avoid this by using gallery/ in the first place, but keeping
query data as a dict until the last possible moment is also nice.
posts/gallery/gallery.py