#13876: Documentation duplicates -------------------------------------------------------+-------------------- Reporter: pakal <chambon.pas...@gmail.com> | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.2 Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------------------------+-------------------- Changes (by Alex):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Old description: > In documentation page "the Django admin site" : a section is written > twice in a row, the one starting with : > "If the string given is a method of the model, ModelAdmin or a callable, > Django will HTML-escape the output by default. If you'd rather not escape > the output of the method, give the method an allow_tags attribute whose > value is True." > > Besides, in request-response doc , two different sections deal with > setting/reading request headers, maybe they should be merged : > > """ > Here's a full example model: > > You can add and delete headers using dictionary syntax: > > >>> response = HttpResponse() > >>> response['X-DJANGO'] = "It's the best." > >>> del response['X-PHP'] > >>> response['X-DJANGO'] > "It's the best." > > Note that del doesn't raise KeyError if the header doesn't exist. > > [....] > > Setting headers > > To set a header in your response, just treat it like a dictionary: > """ > > Cheers, > Pascal New description: In documentation page "the Django admin site" : a section is written twice in a row, the one starting with : "If the string given is a method of the model, ModelAdmin or a callable, Django will HTML-escape the output by default. If you'd rather not escape the output of the method, give the method an allow_tags attribute whose value is True." Besides, in request-response doc , two different sections deal with setting/reading request headers, maybe they should be merged : {{{ """ Here's a full example model: You can add and delete headers using dictionary syntax: >>> response = HttpResponse() >>> response['X-DJANGO'] = "It's the best." >>> del response['X-PHP'] >>> response['X-DJANGO'] "It's the best." Note that del doesn't raise KeyError if the header doesn't exist. [....] Setting headers To set a header in your response, just treat it like a dictionary: """ }}} Cheers, Pascal Comment: Added formatting. -- Ticket URL: <http://code.djangoproject.com/ticket/13876#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.