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 details)

Uploaded Source

File details

Details for the file django-awesome-bootstrap-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-awesome-bootstrap-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ce27fa726d9c566bb694c316901fd99d6c443232bfbfdea7f3fef1c7e3b7e815
MD5 b4ead3d563c9cc0ad8452cfd0332a7a2
BLAKE2b-256 c1fc523bae363efa2851095762904aa153e7436d4f37c32557a6d136a1846497

See more details on using hashes here.

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