Skip to main content

A Django app for including twitter bootstrap and font awesome.

Project description

django-awesome-bootstrap

Twitter Bootstrap + Font Awesome for Django.

This is different from django-twitter-bootstrap in a few ways:

  1. This also includes font-awesome

  2. The folder structure is setup differently to avoid file naming collisions with static content from different projects

Steven, the owner of the project, did a great job with the documentation for that project. So much of what you will find below will be similar to, or the same as, what you will find in his project (thanks Steven :)).

Configuration

Install the app:

pip install django-awesome-bootstrap

Add the app to your installed apps:

# settings.py:

INSTALLED_APPS = (
   ...
   'awesome_bootstrap',
   ...
)

This also assumes you haven’t removed django.contrib.staticfiles.finders.AppDirectoriesFinder from the STATICFILES_FINDERS config setting.

django-pipeline

django-pipeline is not required, but highly recommended when dealing with static content. This project is setup to prevent naming collisions with other static projects. So when static is collected via:

python manage.py collectstatic

There will be separate folders for twitter_bootstrap and for font_awesome. This way their static file naming convention remain namespaced to their app. So when adding these statics files into your django-pipeline configuration settings, you can simply do:

PIPELINE_CSS = {
   'standard': {
     'source_filenames': (
         ...
         'twitter_bootstrap/dist/css/bootstrap.min.css',
         'twitter_bootstrap/dist/css/bootstrap-theme.min.css',
         'font_awesome/css/font-awesome.min.css',
         ...
         # Put your css statics here
     ),
     'output_filename': 'css/YOUR-OUTPUT-FILE_NAME.css',
   }
}

Or you can use individual components from each projects:

PIPELINE_CSS = {
   'standard': {
     'source_filenames': (
         ...
         'twitter_bootstrap/less/alerts.less',
         'twitter_bootstrap/less/dropdowns.less',
         'font_awesome/less/font-awesome.less',
         ...
         # Put your css statics here
     ),
     'output_filename': 'css/YOUR-OUTPUT-FILE_NAME.css',
   }
}

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-awesome-bootstrap-0.1.1.tar.gz (538.9 kB view hashes)

Uploaded Source

Supported by

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