Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Yikes! Stockphoto on Django status update!
The last couple of days I have been seeing a renewed interest in Stockphoto , my basic, minimalist photo gallery ... -
Yikes! Stockphoto on Django status update!
The last couple of days I have been seeing a renewed interest in Stockphoto, my basic, minimalist photo gallery application for Django. At the time, I wondered why, since I haven't updated Stockphoto in the last year, nor made any announcements associated with it. Then, I saw that it had been mentioned in the Django status update on July 22. This is just a little notice on stockphoto's status. Stockphoto 0.2 has quite a few known bugs. I have to-do items for all of them in my personal organization system, most of them with contributed patches. I've just been too busy in my life to integrate all of these fixes and package them into a release. I want to do better and get two releases out the door soonish. So here's the release plan: Stockphoto 0.2.1, soonish. Will fix all outstanding bugs that I know about. Stockphoto 0.3, later. Will include changes to the models to allow slug-based rather than id-based URLs, and some conveniences for template designers. Please bear with me -- if you are in desperate need of a full-featured Django photogallery in the very near future, you will probably want to write it yourself, possibly looking at … -
Web templating systems: be opinionated enough, but no more.
There's some current discussion in the Django community on templating systems on Jacob Kaplan-Moss's website and elsewhere. I agree with ... -
Web templating systems: be opinionated enough, but no more.
There's some current discussion in the Django community on templating systems on Jacob Kaplan-Moss's website and elsewhere. I agree with the general argument. There is a rather fine line between putting too much power into the templating language, so that it either becomes a programming language in its own right, or simply a means of embedding primary-language code in the templates, and putting in too little, so that you can't do more than variable substitution. That's not a big insight in and of itself. I think almost everyone knows this by now. What I think is significant is this: Django's templating system hits the sweet spot for web templating. Through a combination of good taste and (probably) luck, the Django developers have produced a templating system that strongly encourages web developers to put their controller logic and their view logic in the right place. Django's templating system is just tightly coupled enough to make people think twice before using something else. You certainly can use other view technologies, and it's not really hard to do so (just do everything your other template system to produce a string or a file-like object representing the content of the response, and pass it … -
Seasoning Templates
I’m a food geek. I spend my free time contemplating recipes. I bore my friends by talking about the Maillard reaction and annoy them by saying things like, “did you know that cheesecakes aren’t actually cakes at all?” I wonder about the techniques for replacing chemical with organic leavening and vice versa. I watch the Food Network, and Alton Brown is my hero. I cook a lot, of course, and I’ve gotten pretty good at it. -
Announcing django-localdates
localdates is a django app that brings local date presentation to django, by providing custom date filters that can use local-flavored format strings. Reasoning I'm Greek, and the greek language is a lot more complicated than english. There are genders and cases and more stuff that change the suffixes of the words, depending on the use. This is very annoying when trying to create a multilingual site, or when using a multilingual framework like Django. As Malcolm Tredinnick , one of Django's lead developers has put it: (1) The fundamental reason this (date formats) is a problem at all is because we are attempting to construct grammatical sentences out of short fragments. A guiding principle in creating translatable strings is to create complete strings as often as possible because constructing sentences from fragments is very locale specific. From: the relevant discussion, continued from ticket 4147 One of the most visible aspects of this problem is, as you may have guessed, date presentation. Date is a very common function in most sites, and having it appear correctly is a major issue. Up to now, if you wanted a date to look correct in Greek, the only option was to use an … -
Die, Marker Felt, Die!
Like everyone else, I got sick of looking at Marker Felt on my iPhone. So I did something about it. OK, so it wasn’t a huge amount of work; I mostly pieced together the cool shit that others are doing with the iPhone these days. If you, too, would like to (possibly) void your warranty and try it out, here’s the skinny: Follow the custom ringtone instructions (and install ringtones, if you like) through the end of step 13 (i. -
django unicode integration: fix for venus djando template
I just upgraded django tree which recently merged in the unicode support. This immediately broke django templates for venus. Here is what you need to change in planet/shell/dj.py to account for new django changes: 43c43,46 < f.write(t.render(context)) --- > ss = t.render(context) > if isinstance(ss,unicode): > ss=ss.encode('utf-8') > f.write(ss) This is probably due to render [...] -
Creating a portable development environment
I spend much time on other people's computers - I'd like to be able to hack for 30 minutes on an idea, but unfortunately, it isn't easy. I have to download and install numerous software packages, like python, django, subversion, an SSH client etc. So I decided to put all that in a flash drive and take it around with me. Here is what it includes: Portable Python (python + django) Subversion - standalone binaries Notepad2 μTorrent Mac-on-a-stick Portable apps suite that includes: Putty Firefox OpenOffice 7-Zip Gaim Clamwin Sudoku VLC player Not too shabby! I'll play around with it and I'll update this post. Of course the ultimate test is to use it on another computer, and that'll happen next week. Comments -
Supercharging get_next_by_FOO
There is a neat piece of functionality in Django that will allow you to traverse your object graph by date: Get next or previous by FOO, where FOO is a Date or DateTime field: For every DateField and DateTimeField that does not have null=True, the object will have get_next_by_FOO() and get_previous_by_FOO() methods, where FOO is the name of the field. This returns the next and previous object with respect to the date field, raising the appropriate DoesNotExist exception when appropriate... However, these methods use the default manager, that may be not what one wants. Don't override You could override these methods, but admin and many other contrib applications rely on them to return every single object, so you'd break them. Maybe this should be fixed in the trunk by specifying two default managers: one named all and another one named objects. The first could be used by admin-like applications, like admin or databrowse, and the other for applications that display stuff to users. Anyway, until this is done, we can't override, so instead we'll add new methods. DIY Fortunately, we can reuse the functionality of these nice methods, since they accept filter arguments. But, in the principle of DRY, duplicating … -
Dear Adobe
Dear Adobe – Acrobat sucks gigantic mountain-goat testicles. Everything about it from the installer to the interface to its performance seems designed to be as user-hostile as possible. Everyone involved in this project should be ashamed. That is all. -
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 :)