Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-daterange-filter 0.1.1

    Download button

    No screenshots available
    Downloads: 120  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tomas Zulberti | More programs
    BSD License / FREE
    August 27th, 2012, 19:43 GMT [view history]
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-daterange-filter description

    Allow to filter by a custom date range on the Django Admin

    django-daterange-filter is a Django app to add the option to filter by a custom date range on the admin. This allows to inputs to be used to get the custom date range filters.

    See datefilter.png of a screenshot of how this is seen on the admin.

    IMPORTANT:
    this will work with Django 1.4. I won't work with previous Django versions.

    Instalation

    Use pip/easy_install

     pip install django-daterange-filter

    In your models.py

     from daterange_filter.fields import DateRangeField

     class Example(models.Model):

     bar = DateRangeField(null=True, blank=True, etc...) bar.daterange_filter = True


    It is important to use DateRangeField and not to use django.db.models.DateField, becuase the Django class doesn't acept any other format than %m/%d/%yy. Because of this, it won't work if you are using a custom date format on the settings.py. On the other hand, DateRangeField will allow the custom DATE_INPUT_FORMATS defined on the settings.py.

    See http://stackoverflow.com/questions/10973748/django-model-datefield-to-python

    In you admin.py file import the filter. This is the only line that should be used for doing that:

     from daterange_filter import filter


    Product's homepage

    Requirements:

    · Python
    · Django

    What's New in This Release: [ read full changelog ]

    · Removed the custom DateRangeField
    · Improved i18n
    · Special thanks to: https://github.com/DXist

      


    TAGS:

    date range | Django filter | Django | date | range

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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