My Open Source Package:

Django Bulma

Bulma theme for Django

pip install django-bulma

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

  2. Add to INSTALLED_APPS in your settings.py:

    'bulma',

  3. 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 %}
    
    
  4. 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 three dirs:

    • lib - where we put original and untouched bulma package, in most cases you shouldn't mess with it
    • 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
    
  5. 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, * django-allauth account 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

Licence: MIT

Git

Stars

67

Forks

8

Watchers

8

Last commit: 2018-04-16

PyPi

Release Date
0.5.0 2018-04-16 Download
0.4.0 2018-02-28 Download
0.3.4 2018-01-30 Download
0.3.3 2017-12-18 Download
0.3.2 2017-11-30 Download
0.3.1 2017-11-06 Download
0.3.0 2017-10-18 Download
0.2.0 2017-10-11 Download
0.1.0 2017-10-11 Download
0.0.3 2017-10-11 Download
0.0.2 2017-09-25 Download
0.0.1 2017-08-16 Download