[2984 total ]
Radek Švarz: EN | Doubleclick to close updated

The last post about the feature of closing Window by right doubleclicking has got some attention by my Lotus Notes friends.

So here is the updated version, which ignores Lotus Notes as they have the desired functionality ... [More] themselves:

; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx RightDoubleClick closes window

~RButton Up::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) {
ControlSend,,{ESC}, ahk_id %ID%
WinGetClass class, A
If (class = "MozillaUIWindowClass") { ; for Mozilla close only TAB/window
ControlSend,,^w, ahk_id %ID%
}

else If (class = "NOTES") { ; in case of Lotus Notes do nothing
}

else If (class = "XLMAIN") { ; for Excel close one sheet per right doubleclick
WinGetTitle title, A
If (title = "Microsoft Excel") { ; no more sheets - close the application
WinClose ahk_id %ID%
}
else ControlSend,,^w, ahk_id %ID%
}
Else WinClose ahk_id %ID%
}
Else WinGet ID, ID, A
Return

; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Again, use the Autohotkey to run this as it is described on the previous post. [Less]

Cam MacRae: Django Advocacy

Django Advocacy
Having engaged in a spot of workplace Django advocacy over the last few months I figured I would summarise a few of the key points here.

First a note on choosing a framework.
Choosing a framework is much like choosing ... [More] any other software in that you look for established (or simply stable) software which is available at an agreeable price point, and evaluate it against your requirements (whatever they may be: licensing; standards; support; language, etc.). However, shopping for a framework differs from nearly all other software shopping because the philosophy of the framework developer(s) quite necessarily comprises a large part of the evaluation process.

Why?

VoodooPad is one of my favourite pieces of consumer software and I use it every day, but in coarse-grained terms the extent to which the philosophy of the developer (Gus Mueller) affects me is probably limited to the usability and usefulness of the software. (Subtly, of course, Gus's philosophy is all over it, but we're not talking nuance here.) Likewise, I use lmxl every other day, and again the effect philosophy of the developer is of limited scope.

VoodooPad is a tool contained in your application toolbox, but it could be replaced by the desktop edition of MoinMoin. Lxml is a library contained within your application, but you could easily use ElementTree without making any great leap.

A framework, by and large, is a container for your application. The philosophy of the framework developer affects the design of the object model, whether to use an ORM, where and when and what patterns are employed, code reuse, templating, interoperability and determines if I use convention or 13 verbose, but highly customisable configuration files. In fact, the philosophy of the framework developer extensively determines the architecture of your application.

Normally it's none too trivial to migrate your application between frameworks and often you just start from scratch. Philosophy matters: choose wisely.

Python
Django is a Python web application framework. Python is a dynamic, object oriented programming language used by the likes of Google, YouTube, Yahoo, NASA, Microsoft, Compaq, IBM, Nokia, Canonical and ILM just to name a few. Python is a mature technology deployed across thousands of critical systems. Best of all, Python can be learned in a few days. For more Python advocacy see Pythonology.

Modular
Django is a beautifully integrated framework, yet is modular by design. By default you get an ORM (sufficient for most projects, albeit slightly underpowered [getting better all the time]), an MVC framework with a very well designed template engine, and pluggable middleware for caching, authentication and transactions etc.

Just want the template engine? Use it in isolation. Don't like the template engine? Choose another and bolt it on. Need some middleware? Write it and plug it in.

Django encourages modular development of your projects too. Projects are a collection pluggable applications e.g. a blog app, contact form app or inventory search app, wired together (by configuration) to create a website. Templates can be defined (or overridden) at the project level. For example, that one "Contact Us" app can be reused across many sites, seamlessly integrated with the site design.

As an aside, the DRY, application as a component philosophy of Django would make it an ideal framework for CMS development - that is, if you believe the world needs yet another CMS ;)

Ease of use
Django is dead easy to learn. New team members can have their development environment configured and be productive at the end of their first day. At the end of their first day! -- even if they have little or no Python exposure. Why? In part because the simple things stay simple and in part because the hard things are no harder than they absolutely need to be, but most of all because Django is incredibly well documented.

Documentation
Most commercial software projects would be envious of Django's documentation. Installation instructions are clear and concise, but the ultimate hook for new users is the 4 part tutorial.

Tutorial part 1 covers project initialization and structure, building a domain model and ORM API. Part 2 covers the automatically generated admin site (when you get a chance read the code for this; it's instructive), part 3 introduces views and templates and part 4 extends upon these concepts with form processing and one of Django's ultimate time savers, generic views.

I'm quite certain there are thousands of in the wild built solely on the knowledge gained from the tutorial.

In addition to the tutorial, Django's reference documentation is simply outstanding and is notable in that it keeps pace with the development version of the framework. If that's not enough, there is the forthcoming book - you could say it's the tutorial on steroids.

Stability
Django is currently pre 1.0 release, however it each point release (0.9.6 is current at time of writing) has been carefully considered and well executed. It's important to note that backwards compatibility, is not guaranteed until after the 1.0 release. I have found developing against the SVN version quite sustainable, even for production, as it's the intent of the committers to keep trunk as stable as possible. This approach also goes some way to smooth any giant leaps the framework takes as it progresses towards 1.0. Your milage may vary.

As an aside, it must be tempting for the developers to slap the 1.0 moniker on the framework as it is genuinely good enough right now. The restraint and craftsmanship shown in not having done so is indicative of the focus on quality over the project as a whole.

Django is also very much in the wild: See here for a list of Django powered sites.

Community
Not too loud or hype prone, but equally not backwards in coming forwards, the Django community is strong, vibrant and committed. Visit #django on freenode to see what I mean, or else catch up on some reading via Django's community page.

License
Django is distributed under the liberal BSD license. 'Nuff said.

And finally...
This post barely scratches the surface, but potential Django advocates should find (as I did) that the framework stacks up quite nicely (warts and all) when compared with the opposition.

For the uninitiated: Nothing speaks out louder for the Django framework than the framework itself, so if you haven't had a look already, stop reading blogs :P and check it out.

Posted by Cam on Thursday June 21, 2007 at 6 p.m. [Less]

Simon Willison: Django-fr

Django-fr. Community site for French language Django developers. They’ve already made a promising start on translating the documentation.

Ross Poulton : Introducing Djangosites.org

Over the past few weeks I've been working on a website to allow the Django community to showcase what's out there that's built using the fantastic Django framework. With input from others in the community, the site is now live. I introduce to you, DjangoSites.org

Joe Heck: NoonHat

Brian Dorsey has just launched a really interesting site - NoonHat. It’s apparently written in Django (yeah!!!), and the first lunches set up with it happened today. It’s basically a “blind lunch” - you and up to 5 other people that are just tossed together by signing up on the site and indicating a region [...]

Simon Willison: Washington Post and Facebook

Washington Post and Facebook. Deryck Hodge on hacking against Facebook API using Django.

Malcolm Tredinnick: Australian Screen

Congratulations to Thomas, Ingrid and the whole team over at Ether Multimedia on the launch of australianscreen. It's a directory of Australian screen history, complete with video clips. Lots more information, including some of the technical back ... [More] story, over at Thomas' blog.

Aside from being a nice looking website and fun to browse around, it uses Django in the back. Always fun to see something local being built from stuff I've helped out with. [Less]

Paul Bissex: Django.June wrapup

I just wanted to make a quick post to say thank-you to the 20 people who showed up for Django.June yesterday. As I said in the morning, without you I just would have been one crazy guy with a wiki and an empty room.

The MEF meeting room ... [More] worked great. They had some last-minute projector trouble so I brought a replacement borrowed from work. (Thanks to the crack projector troubleshooting team for helping me figure out how to focus. Analog controls, who would have thought!)

Check out Jay's photo set on Flickr for some images from the event. Thanks for documenting, Jay!

Jeff Forcier started a page on the wiki gathering links and resources that were mentioned during the talks. Feel free to add to it (though my current Trac anti-spam setup may get in your way, due to a default threshhold on external links).

In the afternoon we broke up into separate groups for a while; the table I was at was nominally about working on open tickets in the Django Trac. Next time I'd know to allow much more time for this, because with so many interesting people in the room one keeps getting distracted by good conversations. In the end though, I did succeed in filing my little documentation patch at least.

Thank you also to the people who stepped up to give short talks on works in progress and other Django topics.

Finally, a special thanks to Adrian Holovaty, who took time out of his schedule at the Django In June music camp (where I know he was having a fabulous, over-the-top good time) to come give us a talk on new admin features, as well as fielding general questions from the group.

Also, the Saturday night concert was fantastic -- I didn't see any Django.June attendees afterward, being in a musically-altered as well as tired state of mind, but hopefully some of you came out to enjoy it. Wow. All I can say is wow.

Let's do it again next year! [Less]

Marty Alchin: Signed Cookies

Some time ago, I created a Signed Cookies middleware for Django, allowing views to transparently sign and validate cookies. With recent developments on django-developers, it was best to create a separate project for it, rather than maintain it as a ... [More] ticket.

With that in mind, I created a Google Code project for this application. For those who haven't been following its progress, I'll list some of its features:
A middleware to do everything automatically Signs outgoing cookies Validates incoming cookies Removes the signature from incoming cookies (so your views get the cookie as it was originally set) Invalid cookies are silently stripped from the request, as if they had never existed Utilities to manually generate signed cookie values, for greater control Relies on existing data (such as settings.SECRET_KEY), so required additions to your project are minimal So with that in mind, if you happen to need signed cookies for a Django app, feel free to check it out and let me know what you think. And, as always, leave me a ticket if you find anything problematic. [Less]

Paul Kenjora: Simple Character Truncate Filter And Dot Dot Dot Variant

A basic filter tag for truncating long strings and optionally appending a "…". I used this to clean up long URLS at Arkayne. See list on right side of main page.
Background
Say you ... [More] have:

http://www.someverylongurl.com/with/lots/of/characters/that/dont/fit/in/a/line

You want to display only 40 chars:

http://www.someverylongurl.com/lots/o…

Code
The implementation for the plain and dot dot dot filter is wrapped into one file. [...] [Less]