Giter Site home page Giter Site logo

django-freshly's Introduction

Django Freshly

A Django application that enables your server to remotely trigger a client-side asset reload

status-image version-image coverage-image download-image

Overview

A simple trigger of client-side asset reload.

How to install

1. easy_install django-freshly
2. pip install django-freshly
3. git clone http://github.com/un33k/django-freshly
    a. cd django-freshly
    b. run python setup.py
4. wget https://github.com/un33k/django-freshly/zipball/master
    a. unzip the downloaded file
    b. cd into django-freshly-* directory
    c. run python setup.py

How to use (production)

Install django-freshly using one of the methods outlined in the How to install section.

 # Add `freshly` to your `INSTALLED_APP`.

 # Add `freshly.middleware.assets.AssetVersioningMiddleware` to your `MIDDLEWARE_CLASSES`.
 # Note: ensure the middleware is the last item in your `MIDDLEWARE_CLASSES`.

 # Optional: overwrite the extensions list as per your requirements.
 FRESHLY_ASSETS_EXTENTIONS = [
     'jpg', 'jpeg', 'gif', 'css', 'png', 'js', 'ico', 'txt'
 ]

 # Add `FRESHLY_ASSETS_VERSION` to your setting file.

 FRESHLY_ASSETS_VERSION = '001'

 # OR

 FRESHLY_ASSETS_VERSION = 'v001'

 # Up the version and restart Django to force clients to reload your website assets.

How to use (development):

Add FRESHLY_ASSETS_ALWAYS_FRESH to your settings file.

 # Set it to True to force a fresh copy of your assets on to the browsers.

 # Note: Do not use in production.
 FRESHLY_ASSETS_ALWAYS_FRESH = True

 # OR

 FRESHLY_ASSETS_ALWAYS_FRESH = DEBUG

Performance:

The application is a perfect tool for the front-end designers during development.

Running the tests

To run the tests against the current environment:

python manage.py test

License

Released under a (BSD) license.

Version

X.Y.Z Version

`MAJOR` version -- when you make incompatible API changes,
`MINOR` version -- when you add functionality in a backwards-compatible manner, and
`PATCH` version -- when you make backwards-compatible bug fixes.

django-freshly's People

Contributors

un33k avatar n33kware avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.