I just upgraded django tree which recently merged in the unicode support. This immediately broke django templates for venus. Here is what you need to change in planet/shell/dj.py to account for new django changes:
43c43,46
< f.write(t.render(context))
---
> ss = t.render(context)
> if [...]
I am looking for a flash media player which can play audio/video content in browser. I am currently using del.icio.us’s playtagger for now, but it is limited to mp3 only (I had to change the code a little bit to prevent it from adding multiple inclusions - my changed code is here) and it does [...]
Maharshtratimes.com (or maharashtratimes.indiatimes.com) is a marathi news website using unicode fonts. But it does not display correctly on firefox browser. The problem is because of a single HTML div which uses justified font style. It displays correctly on IE (which is why it is not getting fixed) - this could be because of firefox’s buggy [...]
Here is the updated bookmarklet: Phishy? (tested on firefox 2.0 only!)
1. Drag this link to your bookmark. This checks if the site you are currently on is a phishing site.
2. Drag this link to your bookmark. This prompts for a URL and checks if it is a phising site.
Uses phishtank’s check URL API.
If this [...]
Find lattitude and longitude of any address
Yahoo just released a new beta of their maps webservice. Here is a small ruby script (inspired by Rasmus’s PHP code ) that I wrote that returns Lattitude, Longitude of the address provided…
require ‘open-uri’
require “rexml/document”
include REXML
url=’http://api.local.yahoo.com/MapsService/V1/geocode?appid=yahoomap.rb&location=’
puts ‘Enter Location: ‘
address=gets
address=URI.escape(address)
result=URI(url+address).read
doc = Document.new result
r=doc.elements["/ResultSet/Result"]
print “Precision: “, r.attributes["precision"],”\n”
r.children.each { |c| print c.name, [...]
In the django project settings there is a key called MIDDLEWARE_CLASSES which is a tuple of strings implementing the middleware methods. Django base handler (TBD explain what this class does) reads this setting and initializes three of its own attributes: _request_middleware, _view_middleware and _response_middleware. It goes through the list of middleware classes instantiates each of [...]
Django framework has used some design patterns. There is a directory called decorator which currently has two decorators: (decorator is just a method which dynamically adds additional functionality to original method depending on the situation)
funcA = login_required(funcA)
This replaces the funcA with a function which checks if the user is logged in and calls original function [...]
I was just about to abandon python and join the ruby camp to be able to use the wonderful rails framework for web application development. (They do have very good documentation and impressive video demo which you should check out!) But then came the announcement of Django. I really like the python [...]