Skip to content

Instantly share code, notes, and snippets.

@trek
Created September 25, 2008 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trek/12929 to your computer and use it in GitHub Desktop.
Save trek/12929 to your computer and use it in GitHub Desktop.
from routes import *
from routes.util import url_for
m = Mapper()
m.resource('blog', 'blogs')
m.create_regs(['blogs'])
url_for('blog', id=2) # outputs '/blogs/2'
m.match('/blogs/2') # no match
m.match(url_for('blog', id=2)) # no match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment