Allow fine-grained setting of rich text modes per-field.

Review Request #6456 — Created Oct. 17, 2014 and submitted

Information

Review Board
release-2.0.x
8a0971f...

Reviewers

When we introduced Markdown support, we added a single rich_text field
for each supported model, and all fields were tied to that setting.
However, if a person wanted to use Markdown for one field but not
another, they were out of luck. That also required that we perform some
complex escaping/unescaping of all fields on a model when switching text
modes.

This is the first change in a series that splits the rich_text field,
providing per-field flags. The changes are all inter-dependent, but
split up based on layers of the codebase.

This change adds the new rich_text fields, updates logic and templates
to point to the new fields, and removes usage of the old fields.

This testing required the other related changes:

  • Unit tests pass
  • Editing fields in the UI set those fields to be in Markdown format, but
    left other fields un-touched.
  • Fields with a rich_text=false render as plain text, but render as Markdown
    with rich_text=true.
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/evolutions/__init__.py
        reviewboard/reviews/tests.py
        reviewboard/reviews/admin.py
        reviewboard/reviews/models/review_request_draft.py
        reviewboard/reviews/builtin_fields.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/models/base_review_request_details.py
        reviewboard/reviews/evolutions/split_rich_text.py
    
    Ignored Files:
        reviewboard/templates/notifications/reply_email.txt
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/reviewable_page_data.js
        reviewboard/templates/notifications/review_email.html
        reviewboard/templates/notifications/review_request_email.txt
        reviewboard/templates/notifications/reply_email.html
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_request_email.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/evolutions/__init__.py
        reviewboard/reviews/tests.py
        reviewboard/reviews/admin.py
        reviewboard/reviews/models/review_request_draft.py
        reviewboard/reviews/builtin_fields.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/models/base_review_request_details.py
        reviewboard/reviews/evolutions/split_rich_text.py
    
    Ignored Files:
        reviewboard/templates/notifications/reply_email.txt
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/reviewable_page_data.js
        reviewboard/templates/notifications/review_email.html
        reviewboard/templates/notifications/review_request_email.txt
        reviewboard/templates/notifications/reply_email.html
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_request_email.html
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to markdown-redesign (68cbe54)