Some advantages of a Headless CMS include:
- Strongly decoupling data from views, which through a simpler architecture can lead to better security and performance.
- Frontend developers may use whatever tools and libraries they deem best without being forced to deal with backend application logic.
- Application developers can focus on rich content delivery, instead of wrestling with front end frameworks and libraries.
- Many different applications can hook into your backend without additional configuration. Your website is a capable, flexible source of data - for devices such as smartphones or tablets, or any other downstream uses.
How this works
At this time Blemmy only does one thing. It serves an 'Article' model, instances of which can be managed and organised through the Wagtail admin interface by authenticated users. A flexible API is immediately generated, so that the content can be explored in a web browser or REST tool, the data downloaded or referenced in a frontend using JSON or XML endpoints.
The easiest way to set up your machine would be to use Vagrant, then in the project folder in the terminal type:
vagrant up. Then when it is ready, follow instructions for Database setup.
To set up a full development environment, follow all these instructions.
If not using Vagrant: after installing Python 3, from the project folder, deploy system packages and create a virtual environment as detailed (for Ubuntu users) below:
sudo apt-get install python3-venv python3-dev libjpeg-dev pyvenv env . env/bin/activate pip install -U pip pip install -r requirements.txt
At this point your backup is ready to be deployed.
Once your installation is ready, you can get a blank database set up and add a user to login with.
If you are using Vagrant, enter the shell of your virtual machine now with
Run these commands:
./manage.py migrate ./manage.py createsuperuser
You will be asked a few questions to create an administrator account.
If you have one installed, also start your local redis server (
service redis start).
After completing setup, you can use:
(In a Vagrant shell, just use
Now access the admin panel with the user account you created earlier: http://localhost:8000/admin/
Issues with migrating database tables in SQLite during development? Try
./manage.py migrate --fake
For development, it's handy to have access to a copy of the production data. To delete your local database and restore from a file backup, run:
rm blemmy-dev.sqlite3 python manage.py migrate python manage.py loaddata blemmy.home.json
You might want to
createsuperuser again at this point.
It is very easy to contribute. You can fork this repo and send a pull request. Make sure to add your name to contributors.txt. Try to submit an issue to discuss your modifications before the pull request so we can see if they are inline with the project's goals.
You can also open an issue for a feature request or architecture suggestion.
You can also check out the code for any TODO comments.
- create a "starter template" (example)
- add a GraphQL query API.
- add support for Puput's blog models.
- add other new model types and serialisers (check Django REST Framework docs for how to do this. It's easy.), looking at other headless CMS designs for inspiration or standards.
- allow creation of new pages by POSTing JSON data to the correct endpoint.
This project is inspired and aims to reference and collaborate with these projects:
For more information on this types of application, visit: