split in html template
Html içinde split ile kesme Kesme işleminden sonra kaçıncı bloğun okunacağını düzeltebilme {% kes request.path "/" 3 4 %} gelenveri.split("/")[3:4]
- template
- html
- simple_tag
- split
Html içinde split ile kesme Kesme işleminden sonra kaçıncı bloğun okunacağını düzeltebilme {% kes request.path "/" 3 4 %} gelenveri.split("/")[3:4]
simple_tag is nice, but it would be useful if it had a "as variable" clause at the end. This little bit of code factors out the reusable parts and makes a tag almost as simple as simple_tag. Now you can create tags like the following: {% some_function 1 2 as variable %} {% some_function db person %} To add a new function, just do: register.tag("new_function", make_tag(new_function)) (I think you have to take the quotes off a string.)
Simply returns a created gravatar url based on input. Creates the url utilizing the full gravatar url inputs as defined at http://en.gravatar.com/site/implement/url.
Ah simple_tag for get last update of twitter. How twitter limit the fetch rss so, add cache tag for each 30min ( 60*30) update the twitter. if.
A slightly improved version of [snippet #195](/snippets/195/) which keeps the logic but makes use of the `simple_tag` decorator to drastically simplify the code. For an alternative to this sort of tag, check out the media context processor in my [template_utils app](http://code.google.com/p/django-template-utils/).
5 snippets posted so far.