# 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
makemigrationsandmigrate. - Add this on your template file:
{% load opening_hours_management %} {% show_opening_hours object.opening <True/False> %}Hereobject.openingis ourOpeningHoursOneToOne, andTrue/Falseis a condition that makes the templatetag displays special openings/closings that have already occurred. It defaults toFalseif 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
File details
Details for the file django-opening-hours-management-0.0.8.tar.gz.
File metadata
- Download URL: django-opening-hours-management-0.0.8.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab47b427cdb237cb678c60851ae4d71c9fc2680b339d5094337c0029fc9f99a4
|
|
| MD5 |
1d368de35cf95a1dbe66b3980691db27
|
|
| BLAKE2b-256 |
bbd4b32c24a9f3ac79ff6ac4670a0412f8c1af3dab6ce9465a721e4fbe4c468e
|