Using Django’s FormPreview with @login_required

As part of Django’s ‘batteries included’ philosophy, it comes with the FormPreview class to make it easy to automate this workflow: “Display an HTML form, force a preview, then do something with the submission.” Also provided is the @login_required decorator which makes it easy and obvious to mark functions as requiring a logged-in user. Both these features are awesome by themselves, but wouldn’t it be great to combine them and observe how much the awesomeness increases? Let’s give it a shot.

Bug patches for django-voting and django-tagging

As part of my top-secret Django project, I’ve enlisted the help of the django-voting and django-tagging packages to provide rating and tagging, respectively, to my models. These work wonders and serve their purpose to a T, however, I’ve come across a couple small bugs that I wanted to document here, in addition to the bug reports I’ve posted.

Read the rest of this entry »

Multiple File Uploads in Django

As part of yet-to-be-announced project, I’m working with Django. After only a couple days, I’ve been able to produce some pretty cool results. One of the requirements that I have is that a user be able to upload a bunch of files when editing a form. Using Django’s newforms package, I was able to quickly add the ability to upload 1 file, but I wanted the user to be able to upload as many as they wanted.

Read the rest of this entry »

Zensor 0.7 Released

I released Version 0.7 of Zensor a couple days ago. It can be downloaded from WordPress.org.

Read the rest of this entry »

Adding custom columns to the WordPress manage pages screen

This entry is part 3 of 5 in the series Pimp my Manage panel

I wanted to tie together my two recent posts on adding custom columns to the WordPress manage posts screen and the Manage Pages custom columns plugin I released. Below, I’ll extend the code from the first post to use the plugin announced in the second post to add a custom column or two to the Manage Pages screen.

Read the rest of this entry »

Manage Pages Custom Columns plugin released

This entry is part 2 of 5 in the series Pimp my Manage panel

I just released Version 1.0 of Manage Pages Custom Columns, a plugin for WordPress.

Read the rest of this entry »

Adding custom columns to the WordPress manage posts screen

This entry is part 1 of 5 in the series Pimp my Manage panel

An under-documented technique available to WordPress plugin developers that I use in Zensor is adding custom columns to the Manage Posts screen in the admin interface. A search on Google or the Codex turns up very little. The only references on the Codex are on the pages listing all Filters and Actions.

The action/filter that I’m talking about is the complementary pair manage_posts_columns and manage_posts_custom_column. Combined, they let a plugin developer add new columns or shift around/delete existing columns on the Manage Posts screen.

Read the rest of this entry »

Zensor 0.6 Released

I just released Version 0.6 of Zensor. You should download it now! “What is Zensor?”, you might be asking. Well, let me tell you.

Lots of cgkit code

Almost all of the assignments I did for classes last quarter were done using the cgkit graphics library. I’ve posted all of the code that was written for these assignments. Maybe somebody will benefit from it. Here’s everything that’s there:

myFace Updated

A while back, I created a Firefox extension that would combine the awesomeness of myCourses and Facebook called myFace. Today, I’ve updated it to work with the latest versions of Firefox and Facebook. It’s only really relavent to RIT students. Enjoy!