Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Internet > Django Plugins

    djangohelpers 0.11

    Download button

    No screenshots available
    Downloads: 343  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ethan Jucovy | More programs
    GPL / FREE
    December 28th, 2011, 13:09 GMT
    ROOT / Internet / Django Plugins

     Read user reviews (0)  Refer to a friend  Subscribe

    djangohelpers description

    A collection of useful middleware, template tags, etc

    The djangohelpers package is a collection of useful middleware, template tags, etc.

    Contents:

    console scripts

     `maketemplatetag`

     A small script to output a new template tag to stdout, with human readable
     phrases encouraged. Inspired by the nice prepositions in django-tagging's
     template tags.

     If djangohelpers is installed with `setup.py`, a `maketemplatetag` script
     will be provided. Otherwise, it can also be invoked directly with
     `python djangohelpers/console_scripts.py`.

     Run `python djangohelpers/console_scripts.py` for usage information.

    middleware

     djangohelpers.middleware.HttpDeleteMiddleware

     If enabled, it will intercept requests with a querystring key `delete`.
     GET requests will result in a confirmation form, and POST requests will
     have their REQUEST_METHOD set to DELETE.

    view decorators

     djangohelpers.lib.allow_http

       @allow_http("GET", "DELETE")
       def my_view(request, ...)


     Requests with an allowed REQUEST_METHOD will be passed through untouched,
     and all other requests will return HTTP 405 Method Not Allowed.

     djangohelpers.lib.rendered_with

       @rendered_with('foo/bar.html')
       def my_view(request, ...)


     If your view function returns a dict, it will be treated as a template context
     and the template foo/bar.html will be rendered and returned.  If your view
     function returns anything besides a dict, its response will be passed through
     untouched.

     An optional mimetype parameter is also supported:

       @rendered_with('foo/bar.json', mimetype='application/json')
       def my_view(request, ...)

    template tags

     djangohelpers.templatetags.helpful_tags

     A small collection of template tags and filters:

     {% replace_value of 'b' with 7 in my_dict as new_dict %}

     {{my_dict|qsify}} # converts a dict into a query string

     {{sometextwithwhitespace|split}}

     {{my_dict|getitem:'b'}}



    Originally developed at the Columbia Center for New Media Teaching & Learning.


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    template tags | Django helpers | Django | helpers | template

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM