Django documentation

Results

Aggregation

...filter(name__startswith="Django").aggregate(Avg('price')) Filtering on annotations Annotated values can also be filtered. The alias for the annotation can be used in filter() and ...

Django 1.0.1 release notes

...join template filter. Previously, literal strings passed to join were automatically escaped, contrary to the documented behavior for autoescaping and literal strings. Literal strings passed to join ar...

Django 1.1 release notes

...join filter's escaping behavior The join filter no longer escapes the literal value that is passed in for the connector. This is backwards incompatible for the special situation of the literal string ...

Django at a glance

...filter, and it's a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in PHP's date function; yes, there is one good id...

The Django template language

...Filters You can modify variables for display by using filters. Filters look like this: {{ name|lower }}. This displays the value of the {{ name }} variable after being filtered through the lower filte...

Django 1.1 beta 1 release notes

...filter which works just like safe for lists, marking each item in the list as safe. Cache backends now support incr() and decr() commands to increment and decrement the value of a cache key. On cache ...

Built-in template tags and filters

...filter Filter the contents of the variable through variable filters. Filters can also be piped through each other, and they can have arguments -- just like in variable syntax. Sample usage: {% filter ...

Django Exceptions

...filter parameters A field cannot be determined from a keyword in the query parameters A join is not permitted on the specified field A field name is invalid A query contains invalid order_by arguments...

Internationalization

...Joining strings: string_concat() Standard Python string joins (''.join([...])) will not work on lists containing lazy translation objects. Instead, you can use django.utils.translation.string_concat()...

Django 1.3 beta 1 release notes

...filters The Django admin has long had an undocumented "feature" allowing savvy users to manipulate the query string of changelist pages to filter the list of objects displayed. However, this...

Django 1.3 alpha 1 release notes

...filter to fix this problem would require significant effort, and since natural language processing isn't the normal domain of a web framework, we have "fixed" the problem by making the list ...

Making queries

...filter() and exclude() calls. Everything inside a single filter() call is applied simultaneously to filter out items matching all those requirements. Successive filter() calls further restrict the set...

Django 1.2 alpha 1 release notes

...filter the _state attribute of out __dict__. get_db_prep_*() methods on Field Prior to v1.2, a custom field had the option of defining several functions to support conversion of Python values into d...

GeoDjango Tutorial

...join(os.path.dirname(world.__file__), ... 'data/TM_WORLD_BORDERS-0.3.shp')) Now, the world borders shapefile may be opened using GeoDjango's DataSource interface:...

QuerySet API reference

...filtering on the blog names): inner_qs = Blog.objects.filter(name__contains='Ch').values('name') entries = Entry.objects.filter(blog__name__in=inner_qs) This example will raise an ex...

GDAL API

...filter New in Django 1.2: Please, see the release notes Property that may be used to retrieve or set a spatial filter for this layer. A spatial filter can only be set with an OGRGeometry instance,...

Writing custom model fields

...join([''.join(l) for l in (value.north, value.east, value.south, value.west)]) Converting query values to database values Field.get_db_prep_value(selfvalueconnectionprepa...

Models

...joined after 1 Jan 1961 >>> Person.objects.filter( ... group__name='The Beatles', ... membership__date_joined__gt=date(1961,1,1)) [<Person: Ringo Starr] One-to-one relationships...

Model field reference

...filter filenames. Note that the regex will be applied to the base filename, not the full path. Example: "foo.*\.txt$", which will match a file called foo23.txt but not bar.txt or foo23.gif. ...

Writing your first Django app, part 3

...join([p.question for p in latest_poll_list]) return HttpResponse(output) There's a problem here, though: The page's design is hard-coded in the view. If you want to change the way the page looks...

« Previous | Next »

Questions/Feedback

Having trouble? We'd like to help!