Skip to main content

Django Include File Finder

Project description

### Include file finder

This is static file finder for Django which will allow you to specify certain files instead of whole directories like FileSystemFinder do.


### 1. Setup
To install it just copy this folder into your project as an app and include it in your INSTALLED_APPS

include it in STATICFILES_FINDERS


STATICFILES_FINDERS = [
...
'includefilefinder.finder.IncludeFileFinder',
...
]



and add this extra STATICFILES list into your settings.py which will include all files which should be included using collectstatic


STATICFILES = [
# Bootstrap
('css', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/bootstrap/dist/css/bootstrap.min.css'))),
('css', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/bootstrap/dist/css/bootstrap-theme.min.css'))),
('js', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/bootstrap/dist/js/bootstrap.min.js'))),

# Font Awesome
('css', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/css/font-awesome.min.css'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/fontawesome-webfont.eot'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/fontawesome-webfont.svg'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/fontawesome-webfont.ttf'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/fontawesome-webfont.woff'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/fontawesome-webfont.woff2'))),
('fonts', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/font-awesome/fonts/FontAwesome.otf'))),

# JQuery
('js', os.path.abspath(os.path.join(BASE_DIR, 'bower_components/jquery/dist/jquery.min.js'))),
]


Remember to use this pattern

STATICFILES = [
...
('folder', 'path/to/the/required.file'),
...
]


in order to achieve following file structure


/django_app/app/local/folder/required.file


### License
------------
The MIT License (MIT)

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

django_includefilefinder-0.1-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django_includefilefinder-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_includefilefinder-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 86300b8bce33989017b5f3466db3ed853a8ed02cd3606a39fe06dfe4f2d18b89
MD5 df49ec70269ca6d46cd11116111eec42
BLAKE2b-256 86452a5c4436b1854fbc31d214a7192f94325a53b7955b91e653a5789b29bba2

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