Hudarsono's Blog

Quark! Quark! Beware the quantum duck!

 

Using Blobstore with Django

last updated at 2010-11-10 by hudarsono tags:  

To make blobstore works with django is not difficult although its not straight for me. There is a official doc in AppEngine how to use blobstore with webapp. Then I found this post which is quite helpful.

By using that function, we can upload file to blobstore. But then ops, how we serve the file back to client? This is another question that I found during development of MeBlog. Then ...

Read More

Comments

Dead Simple Way to Serve Static File in Django for AppEngine

last updated at 2010-11-6 by hudarsono tags:  

There is a usual way for us to serve static file in Django. Well we can do it the same way for AppEngine and it still will works.

One of the usual way to do it is by routing url started with particular param to the place where we put all the static files. Below is the example :

==== url.py ====
urlpatterns = patterns('',
    (r'^resources/(?P<path>.*)$', 'django.views.static.serve ...
Read More

Comments

How to secure a function with require login easily in Django on AppEngine

last updated at 2010-11-4 by hudarsono tags:  

Found that in AppEngine there is a quite useful way to secure bunch of function from being accessed by unauthorized user. This is called 'decorator' and symbolized by '@' character. So, in AppEngine, if we use webapp framework, we can just put that @login_required in every function that require login.

In AppEngine Helper for Django, this AppEngine build-in operator doesn't work out of the box. So we have to write ...

Read More

Comments
Subscribe
Categories
Tags