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 > HTTP (WWW)

    django-appsettings 0.1.1

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Jared Forsyth | More programs
    BSD License / FREE
    July 15th, 2010, 12:22 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-appsettings description

    A unified settings system for pluggable Django apps

    django-appsettings is a unified system for pluggable apps to have configurable settings. The django-appsettings app provides a clean API for keeping track of settings, and, most importantly, having settings that are configurable for a user that does not have write access to your server appsettings also provides an interface (similar to the admin interface for models) for editing these settings.

    Usage:

    So you want to use this in your app? Well, just create a settings.py for your app (which will be autodiscovered by _appsettings_) and register your settings. Example:

    import appsettings
    from appsettings import values
    register = appsettings.register('mymodule')

    # settings are organized into groups.
    # this will define settings
    # mymodule.story.greeting,
    # mymodule.story.pigs,
    # etc.
    @register
    class Story:
     # int, string, and float types are auto-discovered.
     greeting = "hello"
     pigs = 3
     wolves = 1
     # or you can specify the type
     houses = valuse.IntValue(3, doc = "number of houses in which to hide")
     myhouse = values.ChoiceValue(['straw','sticks','bricks'], 'straw')


    using the settings in the rest of your app couldn't be easier:

    from appsettings import settings.mymodule as settings

    def run_away():
     return "%s pigs are running into a house made of %s"
     %(settings.story.pigs, settings.story.myhouse)


    more thorough documentation (hopefully sphinx-pretty API docs) to come shortly.


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    server appsettings | Django appsettings | unified settings | Django | server | appsettings

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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