Skip to content

Instantly share code, notes, and snippets.

@groovecoder
Created February 6, 2013 17:39
Show Gist options
  • Save groovecoder/4724283 to your computer and use it in GitHub Desktop.
Save groovecoder/4724283 to your computer and use it in GitHub Desktop.
def get_file_url(self):
uri = reverse('wiki.raw_file', kwargs={'attachment_id': self.id,
'filename': self.current_revision.filename()})
url = '%s://%s%s' % (scheme, constance.config.ATTACHMENT_HOST, uri)
return url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment