Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Djangosites Updates
Last week I launched djangosites.org, a new website to show off other websites built with Django. Uptake has been great (as I write this there are 125 websites listed) and feedback has been even better. Firstly there are more RSS feeds. You can view RSS feeds for latest entries, particular tags (eg business), or individual authors. The 'RSS' button at the top-right of most pages links to an RSS feed of your current view, more will be coming soon. Next, listings with source-code available are now more easily identifiable from the listings by a new icon: (a good example of this is the blog tag listing which has a few listings with source-code available) We've also done a fair few minor cosmetic changes, eg signup emails now come from a sane email address, and the signup/login forms match the rest of the site Any other suggestions are more than welcome, in the meantime maddiin and I are working on our next Django community project! Stay tuned for more details. -
Djangosites Updates
Last week I launched djangosites.org, a new website to show off other websites built with Django. Uptake has been great (as I write this there are 125 websites listed) and feedback has been even better. Firstly there are more RSS feeds. You can view RSS feeds for latest entries … -
Django does Oracle!
I just caught up with the Django timeline, and I saw changeset 5519! Congratulations, boulder sprinters! I haven't tested it at all, but it's nice to have. Comments -
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 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 … -
Introducing Djangosites.org
Until now, if you wanted to see a few sites that were built with Django you had to wade through a list of a few hundred links on a wiki page. The links were somewhat organised into categories, but no matter who you ask that's a boring job. Djangosites.org has been built as a showcase of what's out there in Django Land. We hope it lets you easily see what's capable with the Django framework. Feel free to add your sites, post comments on other sites, and vote for your favorites. What I'd really love is if some of the Django heavyweights could post some sites up - it would kick ass if this can eventually replace the DjangoPoweredsites wiki page. Thanks to maddiin for the site design, and to the django-users mailing list for feedback and suggestions. If you have any feedback please don't hesitate to email it to me at ross at this domain. -
Introducing Djangosites.org
Until now, if you wanted to see a few sites that were built with Django you had to wade through a list of a few hundred links on a wiki page. The links were somewhat organised into categories, but no matter who you ask that's a boring job. Djangosites.org … -
Why aren't there any good RAD frameworks for rich clients?
I mean, seriously. For web-apps we have tens (maybe hundreds) of frameworks that abstract away the painful details for creating data-based applications, then get out of the way as you add custom behavior and so on. I mean, using Django, you can whip-up some models, generate the appropriate database schema, play around in admin, maybe use databrowse, use nice html forms, add a dash of HTML+CSS and you get maybe 80% of the functionality. Then you add your custom views, report generation, a bit of AJAX --if necessary-- and you have a nice data-based web application ready for deployment. Why am I ranting about this ? First, for a bit of personal history... Ye not-so-olde days I started out working as a software developer in a laboratory in University of Patras. We developed web applications using JSP and later Struts. For database access we used Borland's QueryDataSets that managed a bit of the complexity --- you still had to write your own SQL --just SELECTs, though--, but you defined some metadata in the columns that you could use later for display purposes. We had a lot of custom code that did introspection so we could easily display QDSs as tables. … -
djangosites.org - galeria de sites feito em django
Eu estava navegando na internet quando encontrei um site feito em django que achei interessante. O djangosites.org, e resolvi escrever sobre ele.O djangosites é um site que tem por objetivo divulgar sites feitos em django.O mais legal desse site é que você pode se cadastrar, votando e comentando sobre os sites cadastrados e se tiver desenvolvido um site usando django, pode divulgá-lo também.Essa é uma dica para quem quer divulgar seu trabalho feito em django, ou ver sites que utilizam o django. -
Using The WebThumb API with Python
First things first: Get an API key from bluga.net by signing up for an account. Next, drop the following code into webthumb.py and enter your API key. """ Python interface to Webthumb API (see http://bluga.net/webthumb/) By Ross Poulton - www.rossp.org License: Use this how you like, just don't claim it as your own because that isn't cool. I'm not responsible for what this script does. Usage: Define WEBTHUMB_APIKEY with your API key, as per the above URL. Then, just call get_thumbnail(url, output_path). It will return true on success, false on anything else. An optional third parameter can be passed for the image size. """ import time import os import httplib import xml.dom.minidom from xml.dom.minidom import Node WEBTHUMB_APIKEY='Enter your webthumb API key here' WEBTHUMB_HOST='webthumb.bluga.net' WEBTHUMB_URI='/api.php' VALID_SIZES = ( 'small', 'medium', 'medium2', 'large', ) def get_thumbnail(url, output_path, size='medium2'): if size not in VALID_SIZES: return False request = """ <webthumb> <apikey>%s</apikey> <request> <url>%s</url> </request> </webthumb> """ % (WEBTHUMB_APIKEY, url) h = httplib.HTTPConnection(WEBTHUMB_HOST) h.request("GET", WEBTHUMB_URI, request) response = h.getresponse() type = response.getheader('Content-Type', 'text/plain') body = response.read() h.close() if type == 'text/xml': # This is defined as 'success' by the API. text/plain is failure. doc = xml.dom.minidom.parseString(body) for node in doc.getElementsByTagName("job"): wait = node.getAttribute('estimate') key … -
Using The WebThumb API with Python
First things first: Get an API key from bluga.net by signing up for an account. Next, drop the following code into webthumb.py and enter your API key. """ Python interface to Webthumb API (see http://bluga.net/webthumb/) By Ross Poulton - www.rossp.org License: Use this how you … -
Installing Django as CGI
When Django was first released, it was only straightforwardly possible to deploy it using mod_python, for which it was designed. ... -
Installing Django as CGI
When Django was first released, it was only straightforwardly possible to deploy it using mod_python, for which it was designed. ... -
Washington Post and Facebook, Part Two
Last time, I wrote an introduction to our development efforts around Washington Post's first app for the Facebook Platform. See that post to get an idea of what Platform is and why it's interesting. In this post, I'd like to talk more about how we used Django to serve the application. In part three, I'll talk about some performance-tuning lessons learned through the course of this development and deployment.Callback ArchitectureFacebook's Platform is based on a callback architecture. The application is hosted on Facebook, users connect to and interact with the application through Facebook, but any page for the application is returned from a callback URL running on our own servers. To help illustrate this, let's look at the process for registering an app on Facebook.The figure below show the first few questions for the setup page for our app, The Compass.Notice there is a "Callback URL" and a "Canvas Page URL". The callback URL is the base URL on the developer's server (washingtonpost.com in our case); the canvas page URL is the base URL on Facebook's server. When you install our app on Facebook, you are redirected to the canvas page URL, which in turn fetches content from the callback. … -
Building My Django Weblog Part 6.6
Just to follow up on the last entry's mention of django-tagging, I thought I'd paste the ebuild I created for it (that I have in my own personal overlay. I'm opting for not providing a download because the version could change and this ebuild code should be valid for higher versions. I named the ebuild django-tagging-0.1.ebuild and threw it into /usr/local/portage/dev-python/django-tagging. After that, just go into that directory and run: ebuild django-tagging-0.1.ebuild digest emerge django-tagging That should do it. Then in your settings.py file, you'd add tagging into your INSTALLED_APPS list, and you're off. Without further ado, here's the ebuild code: # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils MY_P=${P/django-/} S=${WORKDIR}/${MY_P} DESCRIPTION="A generic tagging application for Django projects, which allows association of a number of tags with any Model instance and makes retrieval of tags simple." HOMEPAGE="http://code.google.com/p/django-tagging/" SRC_URI="http://django-tagging.googlecode.com/files/${MY_P}.zip" LICENSE="MIT" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="dev-python/django" RDEPEND="dev-python/django" src_install() { distutils_src_install dodoc *.txt docs/*.txt } All you gentoo + django people can now enjoy the goodness of django-tagging with minimal fuss :) -
Building My Django Weblog: Part 6.5
All of a sudden, more than a month has passed and I have not added any new entries. I've been working on and off on a markdown extension to handle abbr and acronym tags. So far it simply refuses to work (the code doesn't even seem to get executed). For the curious: import re, markdown, random class AcronymExtension (markdown.Extension): def __init__ (self, configs) : self.config = configs def extendMarkdown(self, md, md_globals) : self.md = md ABBR_RE = re.compile(r'\[(.+?)\]\{([^{]+?)\}') ACRONYM_RE = re.compile(r'\[([^\]]*)\]\{\{([^}]+)\}\}') md.inlinePatterns.append(AcronymPattern(ABBR_RE, self.config)) # md.inlinePatterns.append(AcronymPattern(ACRONYM_RE, self.config)) class AcronymPattern (markdown.BasePattern) : def __init__ (self, pattern, config) : markdown.BasePattern.__init__(self, pattern) self.config = config def handleMatch(self, m, doc) : abbr = doc.createElement('abbr') abbr.appendChild(doc.createTextNode(m.group(1))) abbr.setAttribute('title', m.group(2)) return abbr def makeExtension(configs=None) : return AcronymExtension(configs=configs) if __name__ == "__main__": import doctest doctest.testmod() So, in the meanwhile, I'm not able to deliver on my promise to talk more about microformats. However, if you're astute, you've noticed that the tag cloud on these pages has changed. John Buchanan recently released a distutils-enabled version of django-tagging. He's implemented both the features I requested, which makes me greatly happy. I've added the first feature to this site already. Now, when you click on a specific user's blog, you will see … -
Washington Post and Facebook Platform Development
A little over a week ago, my group at WPNI was involved in developing an application for Facebook's latest version of their platform. If you haven't yet heard about this, Facebook Platform now lets developers create full blown Facebook applications just like Facebook's own Photos, Events, and Notes applications. Any developer can create any kind of application which can run on Facebook itself. Our first application is called The Compass. (You must be a Facebook user to view or use the app.)Rob does a much better job than I ever could of explaining the ideas, the creative process, and the Compass itself. I thought I would try to add a little on the technical aspects of the app, specifically the Facebook/washingtonpost.com intergration, deploying on Django, and server performance issues from the Facebook traffic.Facebook PlatformFacebook has had a developer's API since late last year. This API allowed developers outside of Facebook a way to create web or desktop applications that could integrate data from Facebook's social network. A Facebook user could go to a website I created, and given the proper Facebook credentials, login to my site and have some or all of their social data from Facebook follow them. For … -
Going International, pt. 4: Middleware and context processors
Following up to the part 3 of my series about implementing a multilingual interface for this blog, I now present the things to make the language-magic happen: Middleware and context processors. Disclaimer When I wrote this code, I wasn't aware of the threadlocals pattern. In the next iteration of the code, I'll make use of it. For now, it works good enough so it stays. Views, part 2 Those who read carefully or tried to use the code I posted on my previous post, would notice that I was referencing request.url_lang, which of course would lead to an error, since it's not obvious on when and where it's set. So let's present this: Middleware Here's a little helper function that does this: re_language = re.compile(r'^/(?P<lang>[a-z]{2})/.*') def put_language(request): m = re_language.match(request.path) if m: lang = m.group('lang') request.url_lang = lang #print request.url_lang else: raise Exception() return None You can see that it uses a regular exception, so it's trivial to set it up to suit different needs. Now we have another problem, that our URLconfs and views would have to be aware of this URL scheme, and it would make it tedious. So, we go and rewrite request.path like this: class LanguageMiddleware: … -
Some guesses about the future
There’s a fun thread over at Poynter’s Online News mailing list about what the future might hold for digital journalism. I thought I’d post my contributions here as well: Steve Yelvington: For a project I’m working on, I’d be interested in projections, predictions or complete wildass guesses about the near future. Say, 2012, just five years from now. Hey, this sounds fun! Here are mine: The iPhone – that is, the iPhone and the millions of knock-off devices – changes everything. -
Django and Crontab: Best Friends
For a while I know I’ve needed to figure it out, but I finally had to actually do it today. ... -
One rule to bind them - part II
In part I of this article I tried reducing the number of steps a user was required to perform to get a system installed via jumpstart and addressed a couple of the goals I mentioned in Building a manageable jumpstart infrastructure using the Solaris Security Toolkit.My ultimate goal was to reduce steps 1 through 5 and selecting from the build menu to a single interaction such as entering the -
I cut myself on Django's bleeding edge
I just updated the django code to the latest revision, and a whole host of errors broke up... Luckily, I found the culprit fast here. Google is my friend indeed :) Comments -
Problem with django feed
I fell into the obligatory problem where non-public items leak out to public feeds. Sorry to everyone, I've updated the feed. The root of the problem was not using the custom public Manager I have created to deal with this problem in the django-tagging application. It accepts only Model classes. I'll probably hack it up to suit my needs... Comments -
Beware: Python markdown limitations
I use markdown to edit the posts in this blog, using the python markdown library. However, I discovered a nagging problem that will cause to me switch away, to something like ReST. This is an issue that dates back to 2006, and it's very annoying for blogs. You can't put images inside links! This means that the often-used thumbnail image that links to the full-sized original image, has to be done in plain old HTML, which sucks. Here's an example: This should render the google logo linking to google: [![the google logo][logo]][google] [logo]: http://www.google.com/images/logo.gif [google]: http://www.google.com/ "click to visit Google.com" But instead it renders (Actual output): [][google] Source [<img src="http://www.google.com/images/logo.gif" alt="the google logo"/>][google] (Taken from here) Disclaimer: This is about the Python engine of markdown. Other implementations of markdown work fine, as far as I can tell. So, should I just bite the bullet and switch to ReST ? Comments -
Book: From Java To Ruby
Friday night I very quickly read Bruce Tate's From Java To Ruby. By quickly, I mean to say I read it sitting in Borders because I sure wasn't going to part with the $55 (AUD) / $45 (USD) price Borders AU had whacked on a $29 (USD) book - the PDF version is only $20 (USD) so I'll snaffle that for reference. As a reformed Java programmer (and reformed C programmer one paradigm before) in a kinda/sorta evangelizer role, I really appreciate that someone - anyone - would take the time to write this book. In clear, management friendly language (sans cringe and thus palatable to developers), Tate lays out the case for Ruby by bringing both strengths and weaknesses into context. It runs something like this: * Java (and interchangeably .NET) are inherently complex... * Rarely do your problems require such complexity... * There is another way that's cheaper, faster and easier... * For everything else you've still got Java. Ok, so the argument is a touch more nuanced than that, but if you want it word perfect go buy the book ;) I think it's a great thing for proponents of pragmatic development to rally behind Ruby: A … -
He shoots, he scores!
Adrian Holovaty just scored big. Congrats, Adrian! Your work on Django and realted projects is definitly appreciated. Post to Del.icio.us