Django
Django RSS feed-
Gedit as a Django IDE for Linux
Configuring gedit as a Django Text Editor in GNOME
That's right, gedit, the default text editor in GNOME, is actually a pretty bad ass IDE for Django web development. To those who have not really explored gedit it looks much like "Notepad" at first glance. Do not be fooled. gedit is incredibly fast, efficient, and stable. That makes it a great editor. Pair a great text editor with the right plugins and you got yourself a clean, lightweight, simple IDE.
-
AJAX Form Submission in Django
Here is a simple example of using the jQuery javascript framework to hijack and submit a Django form using AJAX. Using unobtrusive javascript to hijack the form's submit event allows for a progressive enhancement web design strategy. In other words, this form degrades gracefully for users who do not have javascript. Moreover, a minimalistic approach is used for the AJAX code so as not to add too much additional maintenance to the project.
-
Django Authentication using an Email Address
The Django authentication system provided in django.contrib.auth requires the end user to authenticate themselves using a username and password. However, it is often desireable to allow users to log in using an email address rather than a username. There are a few different ways to accomplish this and a lot of discussion on the topic.
In this approach, I use a custom authentication backend to authenticate a user based on his or her email address, I hide the username from the end user, I generate a random username for the user when creating an account, and I manually add a unique index to the email column in the database (this is a bit of a "hack" and I'd love to hear suggestions in the comments).
-
Django Dynamically Generated Images with Cairo
It is fairly simple to dynamically generate images in your Django views using the Cairo 2D graphics library. The simple example generates an image "on-the-fly" in a Django view.
-
Authorize.Net Credit Card Form in Django
This Django form will submit credit card data to a payment gateway such as Authorize.Net when the form is validated. If the payment is not accepted then the error response from the payment gateway is added to the form's non field errors as shown in the image to the left.
This is a follow to yesterday's post, Accept Credit Cards in Django with Authorize.Net, in which I introduced a very simple example using the quix.pay Python module to process credit cards in a Django project. This moves the payment gateway request into the Form object rather than the view. It also moves some of those configurations into your typical Django settings.
At some point in the future a finalized version of this technique may be packaged and released by Quixotix Software (open-source of course) but in the mean time I thought I would share you how you might implement this on your own.



