hi all,
So I am coding a little app that acts as a sort of url shortener (like
bit.ly).
Visiting *myapp.com/tcgata* will search my database for an URL linked to '
tcgata'
My reading of the documentation suggests that this can be achieved using
pattern-based URL rewriting in routes.py. As such I made the following file:
routes_in = (
('.*[a-zA-Z0-9]{6}', '/catchAll'),
)
#in default.py
def catchAll():pass
where catchAll is a controller function that will glean the search string
('tcgata') from the request object and redirect to the relevant URL (or 404
if not found). Currently it is a passed function.
However, the redirection doesn't seem to be working for me. When I visit
myapp.com/tcgata i get an error page saying *'invalid function
(default/tcgata)'*.
Where am I going wrong? Is it a routing issue? a regex issue? I am sure it
is something simple I am missing, but I think I need some extra eyes to
find it.
Furthermore, if there is an easier way to do what I am seeing to achieve, I
am all ears!
thanks in advance
Simon