https://github.com/buttercms/flask-cms-blog-example
Flask CMS-powered blog example https://buttercms.com/flask-cms
https://github.com/buttercms/flask-cms-blog-example
Last synced: 12 months ago
JSON representation
Flask CMS-powered blog example https://buttercms.com/flask-cms
- Host: GitHub
- URL: https://github.com/buttercms/flask-cms-blog-example
- Owner: ButterCMS
- Created: 2016-09-14T15:28:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T16:01:47.000Z (over 2 years ago)
- Last Synced: 2025-02-22T17:41:15.346Z (over 1 year ago)
- Language: HTML
- Homepage:
- Size: 23.4 KB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ButterCMS Flask Example
## Important Notice
This project was created as an example use case of ButterCMS and Flask and will not be actively maintained.
If you’re interested in exploring the best, most up-to-date way to integrate Butter into Python Frameworks like Flask, you can check out the following resources:
### Starter Projects
The following turn-key starters are fully integrated with dynamic sample content from your ButterCMS account, including main menu, pages, blog posts, categories, and tags, all with a beautiful, custom theme with already-implemented search functionality. All of the included sample content is automatically created in your account dashboard when you sign up for a free trial of ButterCMS.
- [Python Starter](https://buttercms.com/starters/python-starter-project/)
- [Angular Starter](https://buttercms.com/starters/angular-starter-project/)
- [React Starter](https://buttercms.com/starters/react-starter-project/)
- [Vue.js Starter](https://buttercms.com/starters/vuejs-starter-project/)
- Or see a list of all our [currently-maintained starters](https://buttercms.com/starters/). (Over a dozen and counting!)
### Other Resources
- Check out the [official ButterCMS Docs](https://buttercms.com/docs/)
- Check out the [official ButterCMS API docs](https://buttercms.com/docs/api/)
## Documentation
For a comprehensive list of examples, check out our [documentation](https://buttercms.com/docs/).
## Get Started
This is a sample flask application that uses ButterCMS to power it's blog.
1. Clone this repository.
2. `pip install -r requirements.txt`
3. Update `auth_token = "YOUR_API_TOKEN"` in `buttercms/blog_blueprint.py` (Get a free token by registering on https://buttercms.com/)
4. `export FLASK_APP=app.py`
5. `flask run`
## Use on your app
Simply copy the `buttercms` folder into your app and register it as a blueprint:
```
# In app.py
from flask import Flask
from buttercms.blog_blueprint import blog
app = Flask(__name__)
app.register_blueprint(blog, url_prefix='/blog')
```
Configure the API key in `buttercms/blog_blueprint.py` and then go to /blog to see your blog posts on ButterCMS appear in your app.
It's that easy!
### Other
View Flask [Blog engine](https://buttercms.com/flask-blog-engine/) and [Full CMS](https://buttercms.com/flask-cms/) for other examples of using ButterCMS with Flask.