Feed on
Posts
Comments

Archive for the 'django' Category

helpers sample project

I made a simple Django project, that shows how to implement helpers. It consists of two examples: first is ping pong example, which shows how to implement link_to_remote function, and second is AJAX Form example- it demonstrates how to use form_remote_tag.
You can download it from Google Project page.

Read Full Post »

AJAX.Update and Django errors

Prototype’s AJAX.Update seems to be nice, but it has problem, that it updates target div. Django usual practice is to show error description above form field, and not somewhere below. This is a problem, that can not be solved easily with helpers. I wonder how RoR does it, Google has not been very helpful here.
For […]

Read Full Post »

Django helpers on Google code

Ok, today I put helpers on Google code under new BSD licene. Project page is here.
For now it supports:
helper- generic function, that can call any webhelpers.rails.protype function
visual_effect
remote_function
form_remote_tag
submit_to_remote
periodically_call_remote
link_to_remote
observe_form
observe_field

Read Full Post »

link_to_remote vs remote_function

There is problem with link_to_remote function. While it is nothing more than remote_function with <a href="#"
thingies, it produces some wierd error because Django does not uses routes. In the same time remote_function works ok. Looks like I just add HTML stuff at the end.

Read Full Post »

quick rails style helper

I started to port all helpers stuff to Django, but it’s mainly boring. Then the idea came to me, what if there will be only one (or a little bit more) which handle all calls to webhelpers.
So, there is one function, that can call any Pylons webhelpers prototype function- I called it helper. The idea […]

Read Full Post »

Django helpers diary- escaping URLs

Have not written something in a while, was busy with one of my projects- porting Pylons webhelpers to Pylons. I didn’t know what to write, because there were no big things to write about.
Thinking of which I decided to start writing my project diary- all my problems, what I find out, hoping that others will […]

Read Full Post »

Using Django with helpers

Long time Django was considered as AJAX-unfriendly web framework, which does not allow JavaScript code generation. On other hand , Pylons ported Rails helpers for their framework as webhelpers.
So maybe I can use Pylons templatetags in Django? Sounds hard, because Pylons use heavy Python coding in their templates, but you underestimate power of templatetags.
To show […]

Read Full Post »

JavaScript with Django templatetags

There are lots of tutorials in web concerning integrating AJAX into Django. But they look somehow out of place- you have to insert JavaScript test from view and it’s against DRY. So, I decided to implement JavaScript through templatetags.
First, you need to create templatetag (if you know nothing of templatetags, look at Django template documentation […]

Read Full Post »

Simple Django tutorial

Some time ago I’have written simple tutorial how to create simple blog with Django in Latvian. You can find it here.

Read Full Post »

Last night I finally finished latvian Translation for Django. PoEdit added some strange simbols .po files, but otherwise translation worked.
If you’re interesnted you can get it here.

Read Full Post »