Aquarionics

Djingle Django Scarecrow

One of the concepts you may run into if you read into Python and its fans in great depth (and here I mean Python of the programming type rather than the Monty type) is that of “Guido’s Time Machine”, the number of times when you are thinking “Would it be nice if Python did this…” and you suddenly find that yes, that’s exactly how Python does it, to the point where the only way Guido could have possibly considered all this would be if he already knew.

I’m having the same kind of thing with Django. Frameworks for validation, existing user system, that kind of thing. Stuff like “Do you know what would be nice? If I could do something so that my Logged in User’s Profile appeared in the default scope of a template, so I didn’t have to pass it in every time, and keep throwing it around the program.” and suddenly, there are Context Processors.

The annoying bits are where stuff is under development, or half documented. For example, Having spent a while creating a User Profile system to associate information specific to this system (Authentication code, invite code, email me alerts, for example) and joined it one-to-one with the user system, I then find a tiny little bit of text in the User Auth system docs which says:

get_profile() -- Returns a site-specific profile for this user. Raises django.contrib.auth.models.SiteProfileNotAvailable if the current site doesn't allow profiles.

This sound really close to what I’ve spend a while doing myself, but that is the first, last and only reference to it in the docs that I can find.

OTOH, I’ve now got a system you can log into and register for, and I’ve got a deeper understanding of how Django works. Yay.

Those who spoke on this:

gravatar image

Phil:

2006-10-30 21:40 1 day after the Original Article

It’s rather funny you started doing this again in Django; I was just thinking of doing the same myself, especially since (1) WebRPG is no longer free, and (2) the only fella I know who still does tabletop RP in my area is doing it on a night my Masters’ course takes place.

What a coincidence. Anyhow, just wanted to leave a comment to let you know people are, in fact, still interested in Cantrip (even two years later).

Comment Link


Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


More Journal:

[RSS Icon]
[ESF Icon]
[CDF Icon]

That which is relevant:


Explain Ads
© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.370 seconds, 16 queries, 2.65Mb on Fri, 03 Oct 2008 02:13:21 +0000
Generated by Epistula Version 2.0.3