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-smart-save 0.1

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Derek Schaefer | More programs
    BSD License / FREE
    April 26th, 2012, 07:30 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-smart-save description

    Smart saving of Django models

    django-smart-save is a Django app that provides a simple abstract model that will only save your model object if it is new, one or more fields have been changed locally, or it is specifically instructed to do so. Every field type is inspected for changes aside from ManyToManyFields which do not require a separate call to save. Using django-smart-save can be a provide great performance improvements in the right situations.

    Installation

    Install from PyPI:

     pip install django-smart-save

    Install from GitHub:

     git clone git://github.com/derek-schaefer/django-smart-save.git

     pip install -e git+git://github.com/derek-schaefer/django-smart-save.git#egg=smart_save

    Configuration

    Add smart_save to your PYTHONPATH and INSTALLED_APPS setting:

    INSTALLED_APPS = (
     ...
     'smart_save',
     ...
    )


    (Optional) Use the model-specific configuration settings:

    class MyModel(SmartSaveModel):

     SMART_SAVE_FORCE = True # skips dirty field checking
     SMART_SAVE_IGNORE_FIELDS = ('last_updated',) # will not mark these fields as dirty
     ...


    Usage

    Simply subclass SmartSaveModel. Model-specific options are documented above.:

    from smart_save.models import SmartSaveModel

    class MyModel(SmartSaveModel):
     ...


    Aside from the SMART_SAVE_FORCE model attribute, you can also pass force=True to your model's save method to skip field checking.


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    Django models | models saving | Django | models | saving

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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