Courant News: ‘Get’ Tag


04.20.09 Posted in Courant News by Max

Cre­ated doc­u­men­ta­tion for ‘get’ tem­plate tag.” Such a sim­ple com­mit mes­sage, almost innocu­ous. But to get there, it took a full day of work writ­ing, plus weeks and months cre­at­ing the code to write about. The ‘get’ tem­plate tag is one of the more impor­tant com­po­nents of Courant News, and is some­thing rel­a­tively unique (to our knowl­edge). It allows tem­plate authors to fetch their con­tent from tem­plates with­out hav­ing to write any code (Python or oth­er­wise), main­tain­ing the logic-design bound­ary in Django templates.

I gave a sneak peek at the get tag in my first blog post about Courant News tem­plates, but now I’ve writ­ten the full set of doc­u­men­ta­tion regard­ing its usage and the tools for devel­op­ers to hook into and cus­tomize its func­tion­al­ity. It is quite long, and I don’t feel it would be appro­pri­ate for me to repli­cate it here in text form. I would have to con­vert it from reStruc­tred Text for­mat­ting to Word­Press for­mat­ting, and then there would be this copy of the doc­u­men­ta­tion float­ing around the search-able inter­net in perpetuity.

Instead, since our doc­u­men­ta­tion site won’t be ready for pub­lic access until later this week, I am attach­ing it here for read­ing as a graphic for those inter­ested. Unfor­tu­nately, the styling for the default Sphinx doc­u­men­ta­tion theme doesn’t do the great­est job at demark­ing dif­fer­ent header lev­els; we will be attempt­ing to rem­edy this with our cus­tom theme which is in the process of being built. Until then, feel free to spend some time read­ing about the Courant News ‘get’ tem­plate tag (click to enlarge):

'get' tag documentation

It’s been a labor of love, I hope you find it use­ful. Tomorrow’s post will likely also be a sam­ple of the doc­u­men­ta­tion, prob­a­bly for our enhance­ments to the Django cache frame­work. If you have spe­cific ques­tions con­cern­ing the ‘get’ tag, or if you have a topic that you’d like me to cover in the next few days, please just leave a mes­sage in the comments.



4 Responses to “Courant News: ‘Get’ Tag”

  1. Andrew says:

    Um…wow! That’s incred­i­ble Max. I’m quite impressed that you were able to pull all that off dur­ing a school semes­ter (I’m find­ing it hard enough to fin­ish a design let alone write doc­u­men­ta­tion). I can’t wait to see the code itself and see how it works! Best of luck fin­ish­ing every­thing up.

  2. Neal Poole says:

    I’ll sec­ond that. Wow. I’m really look­ing for­ward to get­ting involved in this project. :)

  3. Neal Poole says:

    Oh, I just got an idea for a topic to cover from your list of mod­ules: dis­cus­sions. I would be very inter­ested to hear more about what the mod­ule has to offer (or will have to offer) out of the box. For instance:
    – Are dis­cus­sions tied to a par­tic­u­lar arti­cle or can dis­cus­sions be cre­ated inde­pen­dent of an arti­cle (or, said another way, to what degree is this a com­ment­ing sys­tem ver­sus a forum-based dis­cus­sion sys­tem).
    – Can dis­cus­sions be threaded?
    – What con­trols, on a per-article basis, are there going to be for discussions?

  4. Max says:

    @Neal

    I’ll do a full post about it some­time soon, but in the mean­time you can check out info at http://docs.courantnews.com/ref/core/discussions.html.

    Just like the django com­ments app, you can attach com­ments to any­thing you want (includ­ing a URL). Not threaded yet, but it’s on our to-do list.

Leave a Reply