Skip to main content

A calendar library for creating HTML calendars that contain query objects

Project description

calendar-plus

Calendar-plus is a simple library for creating HTML Calendar that includes query objects.

This is an example of what the library allows you to do.

Calendar Image

Installation

pip install calendar-plus

How to use

So you have a class for an event object that looks something like below. This example is based on Django framework.

class Event(models.Model):
    name = models.CharField()
    time = model.TimeField()
    date = models.DateField()

The query is events = Event.objects.filter(date__year=year, date__month=month)

Using the library

from calendarplus import ModelCalendar

calendar = ModelCalendar(year=month, month=month).formatmonth(events)

context['calendar'] = calendar

return context

You can now use the context_object_name in your template. This library requires bootstrap framework to render beautifully. You can override the formatmonth to use your own css class.

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

calendar-plus-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

calendar_plus-0.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file calendar-plus-0.0.1.tar.gz.

File metadata

  • Download URL: calendar-plus-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for calendar-plus-0.0.1.tar.gz
Algorithm Hash digest
SHA256 80f1e0a1898ec0c3ebaed8c660cb0ceeb3978f512f0af9d85ca6812b9dc31a9b
MD5 d171374740daf9abb2b17e7a1ff4de31
BLAKE2b-256 284f4afbff83480a6a8fa7ac85c1e28c27f341e199255cc5dfba658a3ddadd77

See more details on using hashes here.

File details

Details for the file calendar_plus-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: calendar_plus-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for calendar_plus-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0143c25a4303af8330855d9b83dbd778da8948680a64c31e9f6b56c3b54ef61d
MD5 ab7b13220dcc0abdad7e177c254a174c
BLAKE2b-256 8a209f32b0f39dccff1e60073fc91b88de83c9874a6d098b414e4101e1553bcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page