You want to create your own custom Django filters in App Engine without running a whole Django stack? Here’s how in a few lines of code. First create a specific python file to hold your custom filters at the root of your application. In my case I use customfilters.py like this: import re from google.appengine.ext import webapp register = webapp.template.create_template_register() def escapeimg(bod
As I continue to make improvement on this blog software, and learn more how to develop with App Engine as a platform, for this post I'll be adding a form handling functions for creating and editing post using Django Forms. What we will be doing here is using the Django Forms instead of ModelForms. The reason why I am not using ModelForms from the google.appengine.ext.db import djangoforms which sh
Atlassian Sourcetree is a free Git and Mercurial client for Windows. Atlassian Sourcetree is a free Git and Mercurial client for Mac. Piston Get the latest version (0.2.3) here. NEW: Discussion group is hosted on Google Groups. A mini-framework for Django for creating RESTful APIs. Piston is a relatively small Django application that lets you create application programming interfaces (API) for you
By this time you should already know how easy it is render web pages for the iPhone using Ruby on Rails. I couldn't find anything similar for Django, so I'm going for it. It's really easy stuff and you'll get to keep your view code (at least most of it) intact. Let's start by creating a decorator that does the rendering bits. In the end, the result should be something like: # -*- coding: utf-8 -*-
I wrote this post in 2009, more than 16 years ago. It may be very out of date, partially or totally incorrect. I may even no longer agree with this, or might approach things differently if I wrote this post today. I rarely edit posts after writing them, but if I have there'll be a note at the bottom about what I changed and why. If something in this post is actively harmful or dangerous please get
rev7084から、{% extends %}の前に別のタグがくるテンプレートが動かなくなっている。cf. extends headaches @ Django developers Google Grouphttp://code.djangoproject.com/ticket/6274http://code.djangoproject.com/ticket/5124つまり、これは動かず、 {% load i18n %} {% extends "base.html" %} {% block content %} It won't work! {% endblock %} これは動く。 {% extends "base.html" %} {% load i18n %} {% block content %} It works! {% endblock %} 僕は前者の書き方で通していたので
DjangoのURLディスパッチャは正引き(URLからview関数への変換)は比較的単純ですが、逆引き(view関数からURLへの変換)はちょっとわかりにくいです。get_absolute_urlメソッド, permalinkデコレータ, urlタグ, reverse関数, url関数, 名前付きURLパターンなど、キーワードはよく目にするけれど、具体的にどうすればいいのかよくわからないということはないでしょうか? Djangoのドキュメントでは正引き・逆引きという視点からのまとまった解説はないので、ここで解説したいと思います。 正引き(URLからview関数への変換) 正引きと言うのはURLからview関数への変換のことです。urls.pyに正規表現とそれに対応するview関数名の組(URLパターン)を定義することで実現しています。その目的のためだけならURLパターンに名前をつける必要は
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く