Tag python
Rate Limiting in Django via memcache by Simon Willison
Simon Willison has published a fantastic code snippet that provides rate limiting for Django applications using memcache as a storage mechanism to avoid continuous database writes. A very useful addition to a Django project if you're unable to do HTTP throttling at the HTTP level (eg via Apache or your hardware routers/load balances) (via Simon Willison)
http://github.com/simonw/ratelimitcache/tree/masterThe Uswaretech Blog: Using Paypal with Django
A great article on using PayPal within Django. Currently for WhisperGifts I create an encrypted button, however this means the users' end-point is the PayPal website. Using the snippets linked to from this article, the user sees PayPal as a single step and the final end-point is on your own website, giving you more control over the checkout process.
http://uswaretech.com/blog/2008/11/using-paypal-with-django/Tony Hauber: Django Schedule, a pluggable calendar app for Django
Tony Hauber has put together a fantastic pluggable application for Django which allows you to manage events, including recurring events. This will be very useful for an upcoming project where I've hacked together my own recurring event framework that's absurdly messy. Recurring events are hard to get right, but it appears Tony has got it right here.
http://thauber.com/blog/post/django-schedule/Jannis Leidel - An autocomplete widget for django-tagging form fields
Jannis Leidel has put together this useful blog post which shows how to use jQuery to provide autosuggest on your django-tagging fields in Django, in both the automatic Admin screens and in your own custom forms.
The only real downside I can see is that it sends the entire tag list with the initial request, so if you have hundreds or thousands of tags then it wouldn't be overly bandwidth-friendly. In those situations it should be relatively easy to modify this to use an XMLHttpRequest, though.
Nice work, Jannis!
http://jannisleidel.com/2008/11/autocomplete-widget-for-django-tagging-form-fields/Easily packaging and distributing Django apps with setuptools and easy_install
This fantastic blog posts shows how easy it is to list your Django applications in Pypi, a Python package registry. The major advantage to this is that future users of your software can just type easy_install mycoolpackage and have your software installed rather than having to download with SVN, move files to the PYTHONPATH, find out why it hasn't worked, etc.
django-assets - Media Asset management for Django
This looks like a very useful application for managing Javascript & CSS files in Django projects. It can combine and compress JS & CSS files either manually (via command line) or automatically (when a user hits your site and one of the files has been changed).
A few sites I'm working on currently include multiple JS files to do their job, this should let me minimise that.
It's just a pity the source code is only available via bzr - since just about every other Django application uses svn it's often nice to keep the status quo. It also removes the ability for other application authors to refer to it via svn:externals. Oh well.
http://code.google.com/p/django-assets/Django 1.0 Alpha Released
Django, my web development framework of choice, has reached Alpha 1.0. There's a bunch of Backwards Incompatible Changes to the API which will require changes to your projects, but the codebase should be pretty stable from here to 1.0.
The biggest changes to this from the last official release are 'Unicode everywhere', a new and more powerful admin module powered by newforms, an updated database ORM that's more efficient, and automatic escaping in templates to help reduce the risk of cross-site scripting attacks.
1.0 should be released with a party at DjangoConf 2008 on September 2nd - I look forward to it (Although I won't be at DjangoConf, unfortunately).
Great work to everybody involved!
http://www.djangoproject.com/weblog/2008/jul/21/10-alpha/Paypal with Django at From Accessibility to Zope
Useful python code sample that shows how to easily use M2crypto to encrypt Paypal web payment buttons.
http://blog.mauveweb.co.uk/2007/10/10/paypal-with-django/HOWTO: Programming S/MIME in Python with M2Crypto
An example of using S/MIME in Python's M2Crypto to sign & encrypt data - as you may do to send encrypted payments to PayPal.
http://svn.osafoundation.org/m2crypto/trunk/doc/howto.smime.htmlDjango Master Class
A presentation given by Django gurus Jacob Kaplan-Moss, Simon Willison and Jeremy Dunck on a few of Django's more interesting features such GIS, OpenID, Signals, and other nifty features that are often overlooked.
http://simonwillison.net/2007/Jul/24/django/Django Quick Tips #2: Image Thumbnails :: SuperJared.com
One of the most common tasks in web development is resizing uploaded images into thumbnails of the original. Today I’ll show you how to accomplish this in Django inside your model....
http://superjared.com/entry/django-quick-tips-2-image-thumbnails/Bayesian SPAM filtering with Python
Elegant Chaos has built this python wrapper to CRM114, a Bayesian spam filtering engine. It provides a simple interface to learn spam / ham, and to scan text. Very useful for embedding spam filtering in your applications!
http://www.elegantchaos.com/node/129Dive Into Python
Dive Into Python is a fantastic book for experienced programmers wanting to learn how to use Python. It's readable online, or you can buy a printed copy. It covers things such as differences between Python and other languages, how to build applications, and neat little tricks to use while working with Python. It also has a unique approach to learning, in that it provides a full script then works through it, rather than providing twenty pages of syntax with an undocumented example at the end.
http://diveintopython.org/The B-List: Django tips: extending the User model
Provides a great way to extend Django's built-in User model, without using nasty hacks or subclassing within Python
http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model