Django

Code

Ticket #5387 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

method Form.is_multipart

Reported by: Petr Marhoun <petr.marhoun@gmail.com> Assigned to: murkt
Milestone: Component: Forms
Version: SVN Keywords: newforms, is_multipart, sprintsept14
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I would like to write this in a general template:

{% if form.is_multipart %}
{% else %}
{% endif %}

I can do it with the attached patch.

Attachments

form-is-multipart.diff (1.2 kB) - added by Petr Marhoun <petr.marhoun@gmail.com> on 09/10/07 11:07:18.
form-is-multipart-test-docs.diff (2.9 kB) - added by murkt on 09/15/07 04:46:28.
Patch with tests and documentation for rev 6268.

Change History

09/10/07 11:07:18 changed by Petr Marhoun <petr.marhoun@gmail.com>

  • attachment form-is-multipart.diff added.

09/10/07 11:09:09 changed by Petr Marhoun <petr.marhoun@gmail.com>

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Again:

{% if form.is_multipart %}
    <form action="." method="post" enctype="multipart/form-data">
{% else %}
    <form action="." method="post">
{% endif %}

09/14/07 18:50:48 changed by flother

  • needs_docs set to 1.

09/15/07 03:13:25 changed by russellm

  • needs_tests set to 1.
  • stage changed from Unreviewed to Accepted.

09/15/07 03:30:42 changed by murkt

  • owner changed from nobody to murkt.
  • status changed from new to assigned.

09/15/07 04:46:28 changed by murkt

  • attachment form-is-multipart-test-docs.diff added.

Patch with tests and documentation for rev 6268.

09/15/07 04:47:16 changed by murkt

  • keywords changed from newforms, is_multipart to newforms, is_multipart, sprintsept14.
  • needs_docs deleted.
  • needs_tests deleted.

09/15/07 05:12:06 changed by mtredinnick

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [6273]) Fixed #5387 -- Added is_multipart method to forms. Original patch from Petr Marhhoun. Tests and documentation from Murkt.


Add/Change #5387 (method Form.is_multipart)




Change Properties
Action