Created
January 12, 2010 09:20
-
-
Save amcgregor/275048 to your computer and use it in GitHub Desktop.
WebCore reusable components idea.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download and install WebCore using the boostrap script. | |
(Optional; skip this if you have an existing environment.) | |
2. Quickstart a new project. | |
(Optional; skip this if you have an existing project.) | |
3. Install WebCore-Blog: | |
pip install webcore-blog | |
4. Configure your application's INI file. | |
4a. Share your existing database with the Blog component: | |
(replace core with your DB connection name) | |
db.core.session = myapp.model:session, web.extras.blog.model:session | |
4b. Create a new database connection for the blog: | |
(replace core with your DB connection name) | |
db.connections = core, blog | |
db.blog.engine = sqlalchemy | |
db.blog.model = web.extras.blog.model | |
db.blog.sqlalchemy.url = ... | |
db.core.sqlalchemy.echo = False | |
5. Import and attach to one of your own controllers: | |
from web.extras.blog.controllers import BlogRootController | |
# ... | |
class RootController(Controller): | |
blog = BlogRootController() | |
6. Enjoy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment