- tag, 140
- tag, 134 underscores (_), 383 ungettext( ) function, 327 Unicode objects, 86 unicode ( ) method, 85, 106 unique field option, 362 unique_for_date field option, 362 unique_for_month field option, 362 unique_for_year field option, 362 unique_together meta option, 368 universal field options, 359–362 unordered_list filter, 452 update( ) method, 93, 472 UpdateCacheMiddleware class, 281, 290, 315 upload_to option, 356 upper( ) method, 47 upper filter, 452 upper tag, 185 UpperNode.render( ) method, 185 upstream caches, 286–287 url argument, 397 url field, 300 url tag, 441 URL_VALIDATOR_USER_AGENT setting, 427 URLconfs capturing text in URLs, 157–158 determining what URLconf searches against, 158 Django error pages, 35–37 Django page, 21–27 include( ) method, 163–165 loose coupling, 31 matching/grouping algorithm, 150 named groups, 148–150 overview, 21, 145 request processing, 28 special-casing URLs in debug mode, 148 specifying in per-view cache, 283 view functions higher-level abstractions of, 158–161 passing extra options to, 150–155 streamlining imports, 145–147 wrapping, 161–162 urlencode( ) method, 473 urlencode filter, 452 URLField field, 359 urlize filter, 452 urlizetrunc filter, 453 urlpatterns function, 24, 147–148 URLs capturing text in, 157–158 special-casing in debug mode, 148 syndication-feed framework, 248 urls.py command, 6, 18, 28, 96 USE_ETAGS setting, 314, 427 USE_I18N setting, 324, 428 user attribute, 471 user change-list page, 99 user comment system (django.contrib comments), 95 user edit form, 99 User object, 266–267 user variable, 55, 169–171 user_add_stage view, 157 user_passes_test permission, 270 user-authentication system (django.contrib auth), 95 username argument, 457 username field, 265 username variable, 164 users admin site, 116 creating, 271 limiting access to, 269–270 using, 265–266 /usr/local/bin directory, 18 'utf-8' value, 420 V validate command, 81, 465 validation, 127–128, 137–139 ValidationError argument, 139 ValueError class, 34, 158, 286 values( ) method, 122, 377, 472 varchar(100) columns, 357–358 variable tag, 174 variable value, 431 /var/tmp/django_cache directory, 279 Vary headers, 287–288 nI N D E X vary_on_cookie decorator, 288 vary_on_headers( ) method, 287–288 verbose_name option, 105–106, 139, 327, 362, 368 verbose_name_plural option, 327, 368 verbosity option, 456, 466 verify_exists argument, 359 version determination, 456 version option, 456 view argument, 312 view functions higher-level abstractions of, 158–161 passing extra options to, 150–155 streamlining imports, 145–147 wrapping, 161–162 view preprocessor method, 311–312 views Django error pages, 35–37 Django page, 21–27 non-HTML content generation, 237–241 overview, 21 second view, 28–30 third view, 31–35 using sessions in, 259–260 using sessions outside of, 261–262 using templates in, 58–59 views module, 123, 145 views.page view, 156 views.py file, 6, 21–22, 29, 35, 133 views.year_archive( ) function, 157 VirtualHost class, 219–220 '/_vti_bin' value, 422 '/_vti_inf' value, 422 W w format character, 437 W format character, 437 Web applications, legacy, 321–322 Web frameworks, 3–5 webdesign package, 292 /weblog/2007/ path, 163 'webmaster@localhost' value, 420 week archives, 406–407 week argument, 407 where argument, 343 whitespace, 440, 450 width_field argument, 357 widthratio tag, 441 wildcard URLpatterns, 32 with tag, 442 wordcount filter, 453 wordwrap filter, 453 wrapper functions, 210 wrapping, 147, 161–162 X X-Forwarded-For header, 309–310 X-forwarded-for middleware (reverse proxy support), 314–315 XMLField field, 359 XSS (cross-site scripting), 173, 343–345 Y y format character, 437 Y format character, 437 year archives, 403–404 year argument, 46, 157, 403–405, 407–408, 410 year field lookup, 384 "year" value, 377 YEAR_MONTH_FORMAT setting, 428 yesno filter, 453 Z z format character, 437 Z format character, 437 ZIP files, 242 499 ... The Definitive Guide to Django Web Development Done Right, Second Edition Adrian Holovaty and Jacob Kaplan-Moss The Definitive Guide to Django: Web Development Done... or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher ISBN 13: 978-1-4302-1936-1... have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work The source code for