Skip to main content

Bulma CSS Framework for Django projects

Project description

A Bulma Theme for Django Projects

Django Bulma

A Django base theme based on Bulma (bulma.io). Bulma is a modern CSS framework based on Flexbox.

*** work in progress ***

Installation

  1. 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 ..

  1. Add to INSTALLED_APPS in your settings.py:

'bulma',

  1. 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 %}

  1. 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
    
  2. 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.

https://github.com/timonweb/django-bulma/issues

2017 - 2025 (c) Tim Kamanin - A Full Stack Django and Wagtail Developer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_bulma-0.11.0.tar.gz (227.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_bulma-0.11.0-py3-none-any.whl (203.9 kB view details)

Uploaded Python 3

File details

Details for the file django_bulma-0.11.0.tar.gz.

File metadata

  • Download URL: django_bulma-0.11.0.tar.gz
  • Upload date:
  • Size: 227.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_bulma-0.11.0.tar.gz
Algorithm Hash digest
SHA256 e248bd78e135418cf87e159c2709488ee4d04dc42d3edafe9c7e01f5242f05b5
MD5 063b34608bc0abdd2d6a53e23ebf4e6e
BLAKE2b-256 3fe8d0f5216d5d3637593f56c8dcfe79a9accc6084b60540d54ba483fbf32a70

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_bulma-0.11.0.tar.gz:

Publisher: release.yml on timonweb/django-bulma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_bulma-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: django_bulma-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 203.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_bulma-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b26c2b4bca2746d86bd5ee7a067978fcebd3a6d6e46a27815a3ad48696c95fb8
MD5 c238e2ae4c35d8d41693a7449608c68f
BLAKE2b-256 9fee4a48050a931d8322bfb57ff67a4a79c8e5ba51e53d064a33b7f3bc6a3a88

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_bulma-0.11.0-py3-none-any.whl:

Publisher: release.yml on timonweb/django-bulma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page