librelist archives

« back to archive

Using a blueprint within a blueprint

Using a blueprint within a blueprint

From:
Anthony Ford
Date:
2011-12-30 @ 04:31
Hey fellow flaskers,
Like the subject says, is there any way to use a blueprint within another
blueprint?

I have some code which has the main app and an Admin blueprint. There's a
few
common views that I want to use in both, but don't want to copy-paste code.
As far
as I can tell, there isn't a `register_blueprint` function on the blueprint
objects.

Should I just add those views to a module and then attach them using
`add_url_rule`

Thanks,
Anthony Ford,
KF5IBN,
Research Assistant,
Center for Advanced Radio Astronomy,
University of Texas at Brownsville
ford.anthonyj@gmail.com