Django Calendar App Just Like Google Calendar

3,948 views
Skip to first unread message

Kashif Ali

unread,
Jan 12, 2013, 1:59:50 AM1/12/13
to Django users
Hello Guys,

Is there any django app available that is a replica of google calendar?
I have checked django-scheduler, django-swingtime and couple of more but the hardest part with these apps/projects is the limited documentation.
Can anybody please guide me what app can serve my purpose?

Thanks,
Kashif

Mario Gudelj

unread,
Jan 12, 2013, 4:52:47 PM1/12/13
to django...@googlegroups.com

I don't think there is one. I looked for one few months ago and ended up building one from scratch with fullcaledar.js, backbone and tastypie

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

william ratcliff

unread,
Jan 12, 2013, 5:00:45 PM1/12/13
to django-users
How did you find the integration?

William

Mario Gudelj

unread,
Jan 12, 2013, 8:44:27 PM1/12/13
to django...@googlegroups.com

It was straight forward. Tastypie makes it really easy to talk json to backbone and plotting the appointments in fullcalendar was even easier. You can have the basic functinality in couple of days. More challenging are the recurring appointments but python's rrule was great help there.

Iñigo Medina

unread,
Jan 13, 2013, 7:33:13 AM1/13/13
to django...@googlegroups.com

On Sun, Jan 13, 2013 at 12:44:27PM +1100, Mario Gudelj wrote:
> It was straight forward. Tastypie makes it really easy to talk json to
> backbone and plotting the appointments in fullcalendar was even easier. You
> can have the basic functinality in couple of days. More challenging are the
> recurring appointments but python's rrule was great help there.

I'm going to code a kind of calendar too. I'm still thinking on a good approach
for the recurring appointments at the data model level. Are you using any app
for that? Or did you define your own data model?

I�igo

Mario Gudelj

unread,
Jan 13, 2013, 5:41:47 PM1/13/13
to django...@googlegroups.com

Defined my own. Actually, i have defined a single appointment/event model and then i create an instance of it with different dates and different slug for the range specified.

Use rrlue - http://labix.org/python-dateutil#head-470fa22b2db72000d7abe698a5783a46b0731b57 to calculate the date and time for every date i the range.

So, this how I did it, but you may find a different way.

I have an appointment model and appointment series which is linked to the appointment model. 

I have an appointment creation form, which can create a single appointment, but the customer also has an option to create recurring appointments, which will create series.

So, customer is filling in the form and they are asked if this is a recurring appointment. I they select yes it presents them with the following screen:


Inline images 1


There they can choose if they want the event to recur daily, monthly, weekly or yearly.

So, when the form is submitted with the interval selected, I create the appointment, create appointment series and then use rrule to create all the dates. 

if form.cleaned_data['is_recur'] == '1':

        # Find the interval first

        frequency_int = int(form.cleaned_data['frequency'])

        if frequency_int == rrule.DAILY:

            interval = form.cleaned_data['daily_interval']

        elif frequency_int == rrule.WEEKLY:

            interval = form.cleaned_data['weekly_interval']

        elif frequency_int == rrule.MONTHLY:

            interval = form.cleaned_data['monthly_interval']

        else:

            interval = form.cleaned_data['yearly_interval']

Then I loop through all the dates created by rrule and create an appointment instance with a different date and the slug, which is the combination of appointment name and the date/time.

e.g. slug /appointment/pregnancy-yoga-dads-support-people-welcome/2013/1/23/0630PM/

In appointment series I store this info:

a_s = AppointmentSeries.objects.create(

                    business=business,first_appointment=appt,

                    frequency=form.cleaned_data['frequency'],

                    is_date_or_number = form.cleaned_data['is_date_or_number'],

                    recurrences=form.cleaned_data['recurrences'],

                    recurrence_end_date=None,

                    interval=interval

                )

You need to save the first appointment from which everything was created so that you can later refer to it when editing the series. 

Anyway, let me know if you need further info and I'm willing to help.

You may want to look at this post for fullcalendar.js and backbone.js integration. It helped me somewhat - http://blog.shinetech.com/2011/08/05/building-a-shared-calendar-with-backbone-js-and-fullcalendar-a-step-by-step-tutorial/

Cheers,

Mario










On 13 Jan, 2013 11:33 PM, "Iñigo Medina" <ime...@grosshat.com> wrote:

On Sun, Jan 13, 2013 at 12:44:27PM +1100, Mario Gudelj wrote:
> It was straight forward. Tastypie makes it really easy to talk json to
> backbone and plotting the appointments in fullcalendar was even easier. You
> can have the basic functinality in couple of days. More challenging are the
> recurring appointments but python's rrule was great help there.

I'm going to code a kind of calendar too. I'm still thinking on a good approach
for the recurring appointments at the data model level. Are you using any app
for that? Or did you define your own data model?

                Iñigo
image.png

Iñigo Medina

unread,
Jan 14, 2013, 8:49:27 AM1/14/13
to django...@googlegroups.com
Thanks a lot, Mario. It is a lot of information and it is great. I like the
approach. I'm already coding something like that, althoug your use of
recurrences is cleaner. :)

I�igo

>
> Cheers,
>
> Mario
>
>
>
>
>
>
>
>
>
>
> On 13 Jan, 2013 11:33 PM, "I�igo Medina" <ime...@grosshat.com> wrote:
>
> >
> > On Sun, Jan 13, 2013 at 12:44:27PM +1100, Mario Gudelj wrote:
> > > It was straight forward. Tastypie makes it really easy to talk json to
> > > backbone and plotting the appointments in fullcalendar was even easier.
> > You
> > > can have the basic functinality in couple of days. More challenging are
> > the
> > > recurring appointments but python's rrule was great help there.
> >
> > I'm going to code a kind of calendar too. I'm still thinking on a good
> > approach
> > for the recurring appointments at the data model level. Are you using any
> > app
> > for that? Or did you define your own data model?
> >
> > I�igo

Margie Roswell

unread,
Aug 10, 2013, 2:36:57 PM8/10/13
to django...@googlegroups.com
Does anyone have a module available that can do a calendar?

The winter thread below involved a whole bunch of coding-from scratch.

I'm not yet a super-coder... (I do have coding skillsets) and I'm just learning django, and python. I figure I'll learn django best if I have a real project; And the real project I have in mind would involve promoting potluck meals. So event listings, and calendar display would be great. Also a mapping component (type in an address, get back a map that displays with the event detail page) 

I'd like to start from as much already-available code as I can.

I like the idea, described below of:
"Tastypie makes it really easy to talk json to...backbone and plotting the appointments in fullcalendar..."

and wow, that sample fullcalendar page looks terrific:

but honestly, I'll do best to start with a working repo.... (events, calendar, address mapping)

(It makes me wonder if anyone has wrapped up a whole bunch of sample django apps, for easy reuse in general.)

Margie


                Iñigo

>
> Cheers,
>
> Mario
>
>
>
>
>
>
>
>
>
>
> On 13 Jan, 2013 11:33 PM, "Iñigo Medina" <ime...@grosshat.com> wrote:
>
> >
> > On Sun, Jan 13, 2013 at 12:44:27PM +1100, Mario Gudelj wrote:
> > > It was straight forward. Tastypie makes it really easy to talk json to
> > > backbone and plotting the appointments in fullcalendar was even easier.
> > You
> > > can have the basic functinality in couple of days. More challenging are
> > the
> > > recurring appointments but python's rrule was great help there.
> >
> > I'm going to code a kind of calendar too. I'm still thinking on a good
> > approach
> > for the recurring appointments at the data model level. Are you using any
> > app
> > for that? Or did you define your own data model?
> >
> >                 Iñigo

Tito Gonzales

unread,
Aug 10, 2013, 5:07:30 PM8/10/13
to django...@googlegroups.com
I made a conector for DHTMLxScheduler for python/django with JS/Ajax.

Makes a clone and run with django 1.5, to customize visit

Margie Roswell

unread,
Sep 3, 2013, 8:36:07 AM9/3/13
to django...@googlegroups.com
I'm late back to this thread, but Tito, thank you! I have a "dumb" (or basic) question. Looks like events can be dragged and dropped. Is that true for the end-user as well?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages