Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7770777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:29:29+00:00 2026-06-01T16:29:29+00:00

I am using fullcalendar jquery library to display a calendar in my django blog

  • 0

I am using fullcalendar jquery library to display a calendar in my django blog application page.I have some Posts created by a logged in user and would like to show him a calendar view of each month with number of posts made by him on each day or 0 if no post was made on a particular day.

I have included the javascript and css files given in the fullcalendar libary and my page is showing the calendar successfully.But then how do you pass the data from the django view to the calendar?When I checked the source of the html page,I saw that the calendar is made of html table.

Has anyone done something similar?Can you advise how to show the number of posts on each calendar day cell?

I tried to think of a solution like this,
For a particular month ,I would need to get probably a dict where key is day(eg:1 april) and value is

len(Post.objects.filter(month='april' ,day='1'))

and pass this dict to the response (which renders the html page above).But then how can I make the calendar take each value from this dict and display it in the appropriate cell?

If my thinking is faulty,please correct me.

I chose the fullcalendar script because it looked nice..but I don’t need any event related functions in it..So I am open to simpler soultions.If you think fullcalendar is overkill ,please suggest a simpler alternative

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:29:30+00:00Added an answer on June 1, 2026 at 4:29 pm

    You need to give fullcalendar “events” data, that could be number of posts and that will be rendered as events. According to the docs it could be in different formats, like js array. You just need to pass that data into template. Template then could look like this:

    <script>
        ...
        $('#calendar').fullCalendar({
            events: {{ posts_counts|safe }}
        });
        ...
    </script>
    

    Where posts_counts is array of dicts in format that fullcalendar supports, look here.

    View could look like this. It’s rough example, just to show how it could be done:

    def calendar(request):
        posts_counts = []
        for i in (1, 31):
            posts_counts.append({'title': len(Post.objects.filter(month='april', day=i)),
                                 'start': '2012-04-%d' % i,
                                 'end': '2012-04-%d' % i})
        return render(request, 'calendar_template.html',
                      {'posts_counts': simplejson.dumps(posts_counts)})
    

    Then fullcalendar on your page should be initialized with number of posts as events. Probably you could then customize calendar look, disable events drag&drop etc.

    Your solution that finds number of posts will generate a lot of SQL queries and it’d be much better to think of a better solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using FullCalendar jquery plugin to display a calendar on my website. I was
I am using the jQuery Fullcalendar plugin. On the same page, I have a
I am using Fullcalendar for jQuery and for some reason the calendar is appearing
I am using jquery full calendar http://arshaw.com/fullcalendar to display the meetings . I just
im using fullcalendar jquery plugin in my web. i have a problem in which
I am using jQuery fullcalendar plugin , I have tried altering this many different
I am using jquery fullcalendar which works great. The one issue I have is
Hello I'm using the fullcalendar jQuery plugin to create a calendar app. When I
I'm using this jQuery Full Calendar: http://arshaw.com/fullcalendar/ According to their documentation, I can load
I have a an application built with the jQuery based fullCalendar http://arshaw.com/fullcalendar/ My calendars

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.