# django-public-holidays

A django app that contains tools and models for working with Public Holidays.

## Usage

• update the database tables for public_holidays:

$python manage.py syncdb or$ django-admin.py syncdb

• A new item will be created in your admin, which allows you to view and update public holidays.

## Notes

A PublicHoliday object has a name, a date and a country. All of these are required, which does mean for something like Christmas Day, you may have many holidays on the same day, but this seemed like the best way to handle it.

A PublicHoliday may also have a list of provinces/states/districts (the name will depend upon the country selected), which are where the holiday is in effect. If no values exist in this list, that means the holiday applies to the whole country. The list of possible provinces is gleaned from django.contrib.localflavor, but if the country is not found in that app, you can enter your own values. This should be a python/json list of strings.

This app was written to allow one of my projects to determine if a given date was a public holiday for wage purposes. The employer/workplace also has an attribute which is a province, and this is used to see if a holiday in a certain country is active for this workplace.

## Requirements

You should have the following installed:

Basically, your pip REQUIREMENTS.txt file should contain lines similar to:

Django
-e hg+http://bitbucket.org/schinckel/django-jsonfield#egg=django-jsonfield
-e hg+http://bitbucket.org/schinckel/django-countries#egg=django-countries
-e hg+http://bitbucket.org/schinckel/django-public-holidays#egg=django-public-holidays

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.