# TODO: Write description
Project description
Manage opening hours with ease!
Install
- Add this in your
INSTALLED_APPS
:"nested_admin", "opening_hours_management",
Use
- Import module in your models.py:
from opening_hours_management.models import OpeningHours
- Add your opening attribute in your model:
opening = models.OneToOneField( OpeningHours, verbose_name=_("Opening hours"), on_delete=models.SET_NULL, null=True, )
- Run
makemigrations
andmigrate
. - Add this on your template file:
{% load opening_hours_management %} {% show_opening_hours object.opening <True/False> %}
Hereobject.opening
is ourOpeningHours
OneToOne, andTrue/False
is a condition that makes the templatetag displays special openings/closings that have already occurred. It defaults toFalse
if not present (example).
Screenshot
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-opening-hours-management-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab47b427cdb237cb678c60851ae4d71c9fc2680b339d5094337c0029fc9f99a4 |
|
MD5 | 1d368de35cf95a1dbe66b3980691db27 |
|
BLAKE2b-256 | bbd4b32c24a9f3ac79ff6ac4670a0412f8c1af3dab6ce9465a721e4fbe4c468e |