Is there a text editor for ipad which supports python and mercurial? It would be even better if there were a solution that also allows one to run and develop with django.
I just don't believe that thing that you want yet exists1. But…
1) There is textastic which supports text highlighting for Python, Ruby, CSS and HTML and it supports FTP, SFTP and WebDAV connectivity (but no version control support). It highlights 80 different file formats but not Django templates (you can edit them like it's just html).
2) GitHub supports online editing for any files under version control using their Ace Editor (of course it's not an app and it doesn't support mercurial yet, but anyway if you like DVCS you should like Git and their Hub too :).
3) Python for iOS. That's what you need for mercurial and Django right? But, Python is scriptable language which is distributed under GPL compatible licence so Apple can just remove this appх from their App Store (because they don't like scripting stuff on their iOS devices and they hate GPL licence)
1 That's mainly because it's too amazing to exist.