Bulma CSS Framework for Django projects
Project description
A Bulma Theme for Django Projects
A Django base theme based on Bulma (bulma.io). Bulma is a modern CSS framework based on Flexbox.
*** work in progress ***
Installation
- Install the python package django-bulma from pip
pip install django-bulma
Alternatively, you can install download or clone this repo and call pip install -e .
.
- Add to INSTALLED_APPS in your settings.py:
'bulma',
- If you want to use the provided base template, extend from bulma/base.html:
{% extends 'bulma/base.html' %}
{% block title %}Bulma Site{% endblock %}
{% block content %}
Content goes here...
{% endblock content %}
-
If you want to customize bulma sass and your own components:
4.1 Copy bulma static files into your project's STATIC_ROOT:
python manage.py copy_bulma_static_into_project
You should see bulma dir appeared in your STATIC_ROOT. It contains two dirs:
- sass - this is the place where you can put your own sass code and customize bulma variables
- css - this is where compiled sass output goes, you should link this file in your base.html
4.2 Install npm packages for sass compilation to work:
python manage.py bulma install
4.3 Start sass watch mode:
python manage.py bulma start
-
For forms, in your templates, load the
bulma_tags
library and use the|bulma
filters:Example template
{% load bulma_tags %} {# Display a form #} <form action="/url/to/submit/" method="post"> {% csrf_token %} {{ form|bulma }} <div class="field"> <button type="submit" class="button is-primary">Login</button> </div> <input type="hidden" name="next" value="{{ next }}"/> </form>
Included templates
django-bulma comes with:
- a base template,
- django core registration templates,
Bugs and suggestions
If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_bulma-0.9.0.tar.gz
.
File metadata
- Download URL: django_bulma-0.9.0.tar.gz
- Upload date:
- Size: 196.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.9 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755939a7433d4db0f2e599582e0f7403e2f932f1e87c72e4fa277ba84132e233 |
|
MD5 | 138285813921f16c559f56f36ab5b3c9 |
|
BLAKE2b-256 | 525d3ce5150e28bfc503e4e1f8eadf11956a42e87ba583687c15d0b2c336e7bb |
File details
Details for the file django_bulma-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: django_bulma-0.9.0-py3-none-any.whl
- Upload date:
- Size: 205.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.9 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db8973724629b6b733c6ea836b7c1b2d79d46ecab3c8fe25d235ba5e677dd1b |
|
MD5 | 223f13caee05429c5383dce62a419244 |
|
BLAKE2b-256 | baecb8506f8b72c5b65d49faac0efc1b4526e0171d250c4af513664074ac49e1 |