Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


BOM is a simple Django app to manage a bill of materials. It supports multiple part numbering schemes, tracking component sourcing information, estimates costs, and contains smart integrations with Mouser to pull in the latest component pricing and Google Drive for part file management. BOM is written in Python 3 and Django 3.

See a live example.

BOM can be added to an existing (or new) Django project, or stand alone on its own, which can be more convenient if you're interested in tweaking the tool.

If you already have a django project, you can skip to Add Django Bom To Your App, otherwise Start From Scratch: Add to new Django project to add it to a new django project, or Start From Scratch: Use as standalone Django project.

Table of contents

Start From Scratch: Add to a new Django project

  1. To start from scratch we recommend setting up a virtual environment
virtualenv -p python3 mysite
cd mysite
source bin/activate
  1. From here install django, and set up your project.
pip install django
django-admin startproject mysite
cd mysite
python migrate
python createsuperuser # make a user for your development environment
  1. Continue on to Add Django Bom To Your App.

Add Django Bom To Your App

django-bom is a reusable django application. If you don't already have a django project, you can follow some quick steps below to get up and running, or read about creating your first django app here. Note that django-bom currently supports python 2.7.

pip install django-bom
  1. Add "bom" to your INSTALLED_APPS setting like this::
    'social_django', # to enable google drive sync in bom
    'djmoney', # for currency
    '', # for currency
  1. Update your URLconf in your project like this::
path('bom/', include('bom.urls')),

And don't forget to import include:

from django.conf.urls import include
  1. Update your to add the bom context processor 'bom.context_processors.bom_config', to your TEMPLATES variable, and create a new empty dictionary BOM_CONFIG.
        'OPTIONS': {
            'context_processors': [


  1. Run python migrate to create the bom models.

  2. Start the development server python runserver and visit to manage the bom (you'll need the Admin app enabled).

  3. Visit to begin.

Start From Scratch: Use as a standalone Django project

  1. To start from scratch we recommend setting up a virtual environment
virtualenv -p python3 mysite
cd mysite
source bin/activate
  1. From here install django, and set up your project.
git clone
pip install -r requirements.txt
python migrate
cp bom/ bom/
python runserver

Customize Base Template

The base template can be customized to your pleasing. Just add the following configuration to your

    'base_template': 'base.html',

where base.html is your base template.


Mouser Integration

For part matching, make sure to add your Mouser api key. You can get your key here.

Google Drive Integration

Make sure to add the following to your


SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = ['email', 'profile', '', '']
    'access_type': 'offline',
    'approval_prompt': 'auto'

And if you're using https on production add:


FIXER is used to handle exchange rate calculations. This is helpful if you may be purchasing parts from another currency (especially via Mouser) and you still need to estimate your part costs.

To set this up you just need to add your API key to as shown in the example.

To update rates, migrate and run python update_rates. Some day we will need to add a (celerybeat?) task to update rates on a schedule. Explained more here.


Contributions welcome! Before contributing your work please read the contributing readme.

Also reach out to to discuss features, and join our slack channel.

Installation Pitfalls



You may get an error during your pip install -r requirements.txt related to sqlite. This may be fixed by installing Visual C++ for python...


Sometimes you'll have issues installing cryptography, if this is the case you may just need to set up some environment variables. This stackoverflow may help.


A simple bill of materials app built using the django web framework.







No releases published

Sponsor this project



No packages published