Photo of Seemant

Seemant's Blog

Dec 15 2006

Updates on Django, CMS’s and Church websites

Categories: , Filed by: Seemant Kulleen
22 Comments Subscribe to this entry's comments RSS feed Subscribe to this entry's comments Atom feed

In still other news, I’ve been playing with django’s newforms module for creating forms on the websites I’ve got in the pipeline. It looks like the StreamBase website will finally be content-managed, though not by django, but by something else. I’m hard at work on getting the website for Aimee going. This weekend will be a ReportLab weekend for me. There are some documents on the church site that will be in both web-readable and PDF-able form. I have this notion that I can do both, though I admit to that being somewhat hopeful. We’ll see.

Before I even do that, I have to do major cleanup on the code already written. It’s funny to see how my knowledge of Django has evolved in the last few months. I’m going back in, currently, to do some DRY’ing of a lot of the stuff in there — gosh I repeated myself! But it was intentional, just to get functionality going — I knew I’d go back in and clean up. And here I am on the other side of that. I’m not complaining at all, mind you, because I feel like I’ve learned a lot when I look at that old code.

I’ll share one of the long-standing issues I’m having. The church has a calendars page which shows upcoming and past weekly schedules. Being a church, they have services every Sunday. During the week and in other rooms/halls they have other meetings (Rotary Club, etc). So, the calendars page needs to show all of those. I opted for this approach in the end: a BaseEvent which holds the date, the title and slug information and description field. The Event object has a one-to-one relationship, and it has fields for frequency and timetables (Timetables are a separate model, so they’re foreign-keyed into the Event). The Service object holds the information on the priest, the crucifers, foreign key to the Sermons, etc, and it also has a foreign keys to the Timetable. If there’s enough interest, I’ll put up that file for you all to see and critique. I definitely have not gotten it right, so I’m glad of any input.

So the idea is that a request to the /events/ URL shows the archive of most recent and immediately upcoming events and services. The same with /events/yyyy, /events/yyyy/mmm/ and /events/yyyy/mmm/dd. So the query dictionary has to include all of them, reversed-ordered by date. A request to the /services/ URL is obviously a filtered query, and the like. Now, when you click on a specific event, it either goes to /events/yyyy/mmm/dd/event-name or to /services/yyyy/mmm/dd/service-name. That’s the motivation for all this. If there’s a better way you can think of, please drop me a comment. I’m definitely interested in the opinions of you ruby and rubyonrails people.

Permanent Link
Subscribe to this entry's comments RSS feed Subscribe to this entry's comments Atom feed

22 Comments

United States Comment by Justin after 5 months, 1 week

I am just starting on a similar project — a Django calender for my church website. I'd love to see what you came up with (even if its not perfect) to get some ideas.

On your calendar page are you just displaying a list of events, or are you populating an actual calendar?

Thanks, Justin

China Comment by heat pump after 4 years, 1 month

This article is very usefull for me! I can see that you are putting a lots of efforts into your blog. I will keep watching in your blog, thanks.

Netherlands Comment by buy windows xp after 4 years, 9 months

This is a set of words, not an essay. you are incompetent

Netherlands Comment by dreamweaver cs4 mac after 4 years, 9 months

This is a set of words, not an essay. you are incompetent

Germany Comment by auto approve blog after 4 years, 9 months

I like what I see so i am just following you. Look forward to exploring your web page yet again.

Germany Comment by buy acrobat reader after 4 years, 10 months

Subscribed to your blog, thanks

Russian Federation Comment by free erection pills after 5 years

This is exactly what I was looking for, thanks

Russian Federation Comment by cialis 10 mg after 5 years

r u sure that is true?

Moldova, Republic of Comment by cheap laptops after 5 years

My spouse and I stumbled over here different website and thought I should check things out.

Moldova, Republic of Comment by CD receiver after 5 years

really good things here, just thanks

Moldova, Republic of Comment by buy digital cameras after 5 years

You just copied someone else's story

Moldova, Republic of Comment by blackberry reviews after 5 years

You are the worst writer

Moldova, Republic of Comment by laptops after 5 years

Not so bad. Interesting things here

Moldova, Republic of Comment by Car Gadgets Reviews after 5 years

i can agree with the article

Germany Comment by laptop after 5 years, 1 month

It's super blog, I want to be like you

Germany Comment by no fax canada payday loan after 5 years, 1 month

I'll complain that you have copied material from another source

Germany Comment by quick fast cash loans after 5 years, 1 month

Learn to write himself, the article from another source

Germany Comment by payday loans no credit check after 5 years, 1 month

Hey, buddy, I have not figured out how to subscribe

Moldova, Republic of Comment by instant approval 2500 personal loan after 5 years, 1 month

Reading by way of your nice content, will help me to do so sometimes.

Moldova, Republic of Comment by independant payday lenders after 5 years, 1 month

Learn to write himself, the article from another source

Germany Comment by mutual credit union after 5 years, 1 month

I am looking for a competent writer, long time in this area. Excellent article!

Moldova, Republic of Comment by Casino En Ligne after 5 years, 2 months

rosemond mesa subsoil stevo ayse haefelin Keri juli safebreaker

Join the conversation