June 2010
3 posts
3 tags
thecodefarm team →
I’m going to play with Dajax. It’s created by Jorge Bastida from thecodefarm team. I like them. :)
Jun 19th
4 tags
How to extract html page title by URL
Actually the subject can be divided into two tasks: retreive data extract information from it There’s standard library urllib2 in Python for retreiving data over HTTP and a number of libraries for parsing HTML data. I’ll use html5lib in this example. First iteration of retrieving data import urllib2 def read_url(url): try: response = urllib2.urlopen(url) except...
Jun 4th
4 tags
Django Widget for CommaSeparatedIntegerField with... →
Assume, we need a registration form for some event with time frame for 3 days, starting at Monday. User can select any of 3 days, so we need to show 3 checkboxes. Here’s the basic example for such form: class EventRegistrationForm(forms.Form): days = forms.CharField(widget=NumbersSelectionWidget( ['Mon', 'Tue', 'Wed'], range(1, 4)))
Jun 4th