-
Pet Projects
Tag Archives: django
I got stuck for almost an hour trying to create a multiple select checkbox. Here is how to do it: First, I put this in my forms.py class UserlistForm(forms.Form): users = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,label="Notify and subscribe users to this post:") Then in … Continue reading
In some cases you would want to have “private” images for your logged-in users, you will not be able to store the images in the public accessible directory. For example, if you have “my_private_photo.png” stored in your normal “images” directory, … Continue reading
Here is how to setup/install mod_xsendfile in Apache2 + Django (mod_wsgi). First do this to install apxs2 $> sudo apt-get install apache2-prefork-dev Download mod_xsendfile: http://tn123.ath.cx/mod_xsendfile/ Install it by doing this: $> apxs2 -cia mod_xsendfile.c If you get an error compiling … Continue reading
I am planning to build something involving serving large files over HTTP. Putting the files in a public accessible directory is not an option since I need to monitor the users who download the file. Users will need to login … Continue reading
This is probably my first post for Django. I have only been using it for a few weeks and I am already falling in love with it. Here is how to do an AJAX “save” using jQuery and Django. My … Continue reading