Django Formset Can Delete

Last update on March 20, 2015.

When setting can_delete = True in django formset factory, remember that the delete field in the form is in capital letters.

eg: {{form.DELETE}}

Ajax Post + Django

Last update on March 20, 2015.

When using $.ajax post you must be careful of what you set as contentType option. If you set it as 'application/json' you will have to parse the data from the request.BODY variable in your django class based view. The request.POST variable (Querydict) will be empty. It is better to not use the ...

Continue reading

Django Shop Or Django Oscar

Last update on Aug. 4, 2014.

Trying to figure out what to use django-shop or django-oscar for a subscription type product. What exactly happened to satchmo. Well will be posting about my trials and tribulation with django-shop.

Hoping these docs help.

Spam Comments

Last update on July 14, 2014.

Due to incredible amount of spam comments, comments will be temporarily shutdown in the blog section.  It will stay that way till I get time to implement a captcha.

Deleting Millions of Files in /var/spool/clientmqueue/ folder

Last update on April 10, 2014.

In case you have to delete millions of files, like in clientmqueue folder.

Use this code, Save this as listdirdelete.c

Compile it with gcc: gcc listdirdelete.c -o listdirdelete

Then use ./listdirdelete /var/spool/clientmqueue

The code will list the files and delete them one by one. The problem with other methods I tired ...

Continue reading

Google ComputeEngine Copying from Old disk Snapshot

Last update on Feb. 11, 2014.

Recently Google upgraded their compute engine to remove the ability to have scratch disks. This mad our instance go down and we were not able to connect to it via ssh, as it was TERMINATED. Since we were not able to connect to it we were not able to do the migration to new the ...

Continue reading

Kello Clock

Last update on Feb. 9, 2014.

Kello Clock

A clock wallpaper.

How to convert string to datetime object in python2.4. strptime usage in Python 2.4

Last update on March 2, 2015.

Python 2.4

datetime(*(time.strptime(date_string, format)[0:6]))



Python 2.7

datetime.strptime(date_string, format)


Yearly archives