Biblioteka Riklaunima - rkblog.rk.edu.pl http://www.rkblog.rk.edu.pl/ Artykuły i Wiadomości z rkblog.rk.edu.pl pl Biblioteka Riklaunima - rkblog.rk.edu.pl http://www.rkblog.rk.edu.pl/site_media/layout/tux.png http://www.rkblog.rk.edu.pl/ 132 124 http://www.rkblog.rk.edu.pl/w/p/post-your-diamandamyghtyboard-feature-request/ http://www.rkblog.rk.edu.pl/w/p/post-your-diamandamyghtyboard-feature-request/ Post your Diamanda/MyghtyBoard feature requests :) I'm remaking the user interface of all Diamanda Apps, including forums (MyghtyBoard), I'm cleaning the code, adding some features but the questions is what people that want to re-use Diamanda components want to have out of the box. For example MyghtyBoard doesn't has/doesn't use user profiles, no avatars etc. Do you want a basic forum, that you can extend as you like, or do you want a fully featured discussion board?
myghty.png
2008-04-24 13:25:57.662180
http://www.rkblog.rk.edu.pl/w/p/appengine-everywhere/ http://www.rkblog.rk.edu.pl/w/p/appengine-everywhere/ AppEngine everywhere :) Yes, everyone is talking about it :) It looks cool, but I have to wait in line... But here I have a quote from one of "reviews":
For virtualization reasons only the pure Python is supported and a subset of the Python standard library.
Hm... so I can't have PIL there? If so web based services and tools will get big attention (google charts and not matplotlib, pixenate and others and not PIL).
disk storage is up to 500M, both incoming and outgoing traffic is restricted to 10G per day each, up to 2000 emails per day, and up to 200 million megacycles of CPU per day
All my sites would fit :)
2008-04-08 22:24:33.012677
http://www.rkblog.rk.edu.pl/w/p/diamanda-200804-test1-released/ http://www.rkblog.rk.edu.pl/w/p/diamanda-200804-test1-released/ Diamanda 2008.04 Test1 released I've released a snapshot/beta package of current Diamanda code. This release is designed for (latest) Django-SVN. Bigger changes are: rewritten userpanel (uses Django auth views), migration to newforms in forum (MyghtyBoard) and boxcomments, UI fixes and enchantments. I have some more features on the ToDo list, and I'm planning one or two Test releases before stable one. You can download tar.bz2 from code.google.com, or use SVN:
svn checkout http://diamanda.googlecode.com/svn/trunk/ diamanda-read-only
2008-04-07 16:48:28.481531
http://www.rkblog.rk.edu.pl/w/p/reason-openid-support-core-django/ http://www.rkblog.rk.edu.pl/w/p/reason-openid-support-core-django/ Reason for OpenID support in core Django Simon Willison created django-openid package that adds OpenID support in Django. It is nice, and easy to use but today it's broken as it wasn't updated for compatibility with latest python-openid and python-yadis. It's broken and abandoned - see list of issues. django-openid-auth is using this component so it's broken too. django-authopenid works, but it's bit too much if you want to add basic OpenID support. OpenID support affects Django user/auth system so the nicest way would be to have OpenID support in core Django so there wouldn't be any problem with compatibility and integration. Or maybe general way of extending user/auth system?
Edit: There is some development of django-openid in a branch ;)
2008-03-29 23:48:45.823815
http://www.rkblog.rk.edu.pl/w/p/pil-great/ http://www.rkblog.rk.edu.pl/w/p/pil-great/ PIL is great In my job I got a task to check what can make good thumbnails of big JPEGs in shortest time. As the site is written in PHP I've tested MagicWand and GD plus PIL and EPEG. Making thumbs from few pictures (40MB) took for MagicWand Resize 4,7s, MagicWand Scale 1,77s, GD 0,8s, PIL 0,2s, EPEG 0,15s. EPEG is a e17 library which is designed to make JPEG thumbs but it lacks extra filters (sharpen) so the thumbs aren't top quality. PIL has antialias, sharpen and preserves ratio by default and is faster than GD and imagemagick (convert and MagicWand in PHP) so PIL won. 2008-03-07 17:27:00.298891 http://www.rkblog.rk.edu.pl/w/p/diamanda-back-svn/ http://www.rkblog.rk.edu.pl/w/p/diamanda-back-svn/ Diamanda back in SVN Diamanda code is back in SVN, but it's still far from being done so expect a lot of changes. Currently the code was cleaned up a bit, I've removed my site specific code and made it work on latest Django-SVN (required).
svn checkout http://diamanda.googlecode.com/svn/trunk/ diamanda
2008-03-04 23:19:55.880975
http://www.rkblog.rk.edu.pl/w/p/gdata-token-validation-problems/ http://www.rkblog.rk.edu.pl/w/p/gdata-token-validation-problems/ GData token validation problems To authenticate a web based application for use of Google services through GData we use AuthSub, which will generate a token. To get a token for multiple requests we can use session token. Ok, but how the token is validated ? For me it's an important question, as I have to make similar API. I've written a simple Django authentication decorator and two simple views using the session token: Google GData Authentication decorator - Google GData API can be used to retreive data from Google services... It can also be implemented on other sites (which I have on my ToDo list at my current job) helping in creation of backed applications. "Read" to see a simple view with custom decorator that authenticate user agains a GData provider (Google in this case). You can also read the auth docs.
What if I get a session token – and hardcode it in the code:
def index(request):
	"""
	Simple example - list google docs documents
	"""
	request.session['token'] = 'session token here'
	if 'token' in request.session:
		con = HTTPConnection("docs.google.com")
		con.putrequest('GET', '/feeds/documents/private/full/')
		con.putheader('Authorization', 'AuthSub token="%s"' % request.session['token'])
		con.endheaders()
		con.send('')
		r2 = con.getresponse()
		dane = r2.read()
		soup = BeautifulStoneSoup(dane)
		dane = soup.prettify()
		return render_to_response('a.html', {'dane':dane}, context_instance=RequestContext(request))
	else:
		return render_to_response('a.html', {'dane':'dupa'}, context_instance=RequestContext(request))
And call this view from a browser in which I'm not logged in to my Google account, or put this app on another server than my public localhost. Will it work? YES :) The token seems to be valid for different domains/IPs (you specify GET next when you request one-time-token at start...) and it isn't (it can't be?) validated if it's really me that uses the token (and not an evil server that harvest my contacts :)). I may be wrong, but it's not so super secure when a simple token may give someone read, and even write access to my data at GData enabled site.
2008-02-05 15:25:48.811330
http://www.rkblog.rk.edu.pl/w/p/google-gdata-authentication-decorator/ http://www.rkblog.rk.edu.pl/w/p/google-gdata-authentication-decorator/ Google GData Authentication decorator Google GData API can be used to retreive data from Google services... It can also be implemented on other sites (which I have on my ToDo list at my current job) helping in creation of backed applications. "Read" to see a simple view with custom decorator that authenticate user agains a GData provider (Google in this case). You can also read the auth docs. 2008-01-24 17:08:57.529619 http://www.rkblog.rk.edu.pl/w/p/upgrading-diamanda-djang-svn/ http://www.rkblog.rk.edu.pl/w/p/upgrading-diamanda-djang-svn/ Upgrading Diamanda to Django-SVN In the last few days I have been updating code of my sites to be more Django-SVN compatible, and to clean few things. Things that have been done:
  • Removed auto_now and auto_now_add as they will be gone (read here about it).
  • Renamed maxlength to max_length in models and oldforms forms
  • migrating from oldforms to newforms – boxcomments for now only :) newforms are much "bigger" than oldforms and "how to make this in newforms" takes some time.
  • Added |safe in templates where it's needed to show HTML
  • Some time ago – make it work after UTF branch merged :)
Plus code clean-up :) a lot of cleaning with imports, comments, and removed some unneeded "features". When all work will be done (newforms in Forum-Myghtyboard and other components) a new Diamanda release will go public.
2008-01-12 15:31:13.999113
http://www.rkblog.rk.edu.pl/w/p/django-comet-and-irc-client/ http://www.rkblog.rk.edu.pl/w/p/django-comet-and-irc-client/ Django, Comet and IRC client How to make a simple web IRC client using comet - orbited 2008-01-04 16:55:02.321760