Actually, we do something very similar to this in a routes.py for a flask
app. Except instead of "pass" we call a function that has been imported.
Paul
*Flask*
> Doesn't really have the idea of putting all your routes in one spot. So
> pardon the silly example.
>
>
> @app.route('articles/2003/')
> def special_case_2003():
> pass
>
> @app.route('articles/<int:year>/')
> def year_archive(year):
> pass
>
> @app.route('articles/<int:year>/<int:month>/')
> def month_archive(year, month):
> pass
>
> @app.route('articles/<int:year>/<int:month>/<int:day>/')
> def article_detail(year, month, day):
> pass
>
> @app.route('articles/<string:slug>/')
> def slug_view(slug):
> pass
>
>
--
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/1177f3c9-fe36-41b4-b6b3-
> 69daae8d8409%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/1177f3c9-fe36-41b4-b6b3-69daae8d8409%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CAD4jHOKtBtgV7VQ-v1%3DOy%3DpJmO15mbg%3D8Agu%3DoDaDKq0APxiaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.