I was really looking forward to get a chance to play with Google Wave. If you have not heard about this, Google is experimenting with a new means of communication and collaboration (to destroy any remains of your unused time!). Watch the video of the demo from Google IO conference to get a feel for the technology.
The catch line is - How would email be if it is designed today ?
Being Google, they are fairly open about the entire technology.Google Wave is a collection of several components which work in concert to bring us this amazing way to collaborate and communicate. There is the wave server (which hosts the waves. Google provides an implementation and others are free to implement it in their own control), federation protocol (which is open specifications protocol and allows the servers to talk to each other), the client (typically your web browser which you use to interact with the wave server, but there is a sample text client and emacs based client in development as well!), the gadgets (small pieces of code that are embedded in documents and provide rich look and feel and additional functionality to the wave) and the robots (robot participants in the wave which can do cool things like correct spelling as you type, syntax highlight code while it is being pasted in the wave, translate language etc.)
I have spent some time in developing a robot called Nokar (meaning assistant or servant in Marathi/Hindi) which can do several things when invited to a conversation - Insert images based on specified keywords, translate text between a set of 20 languages among some other geeky functions. The intention was to learn about the robot protocol. I also created some pages which use the embed API. This allows any web page to embed a wave conversation (or a subset of it). I am also going to experiment with the Gadgets in the next few weeks. I will try to document my process in next few posts.
If you want to download files from machine A to machine B and have python installed on machine A, here is a very simple way to do it:
On machine A, open a command window and change directory to where the files are and run this command:
python -m SimpleHTTPServer
This command starts a web server serving files from that directory.
On machine B, just open a browser and type the ip address of machine A and port 8000 and you can see all the files. When the transfer is done, simply press control-C in the command window. A simple way to temporarily share your files across the network!
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:
> ss = t.render(context)
> if isinstance(ss,unicode):
This is probably due to render returning unicode strings which need to be converted to byte-streams.
Update: I found out that my changes broke it for people using older version of django. I have updated the patch above to account for that.
I needed to reset the django admin password and found this page which tells us how to do this. It did not work for me, however I tried to get the user object explicitly, reset the password and save it and it worked!
Here is a session describing the behavior:
> python manage.py shell
In : from django.contrib.auth.models import User
In : u=User.objects.all()
In : u.password
In : u.set_password('testme')
In : u.save()
In : u.password
In : q=User.objects.get(id=1)
In : q
Out: <user : root>
In : q.set_password('testme')
In : q.save()
In : q.password
Maybe this is related to queryset caching, which would print the same password even after calling set_password. But it looks like in the first method, the password does not even get written to the database. This might be a bug. I will need to run more tests and report (or possibly patch) it...
Update: Perhaps I am not clear in the above post. The weirdness is that in the above two scenarios u and q should essentially reference the same user object, but calling set_password (and later save) method on the u reference does not seem to work (i.e. the password attribute remains unchanged and changed password cannot be used on the admin pages) but calling the same method on q reference seems to work!
Update2:I got it finally. Thanks all (Esp SmileyChris) ! every array slice is a new query! so in the first solution, I need this to make it work:
u.password # to display current hash (Query #1)
q=u # (Query #2)
u.password # (Query #3) this should print updated hash!