Opened 13 years ago

Last modified 13 years ago

#120 closed defect (FIXED)

User bio should be Markdown-enabled

Reported by: joar Owned by: Aaron Williamson
Priority: minor Milestone: 0.0.4
Component: programming Keywords:
Cc: Parent Tickets:

Description

The user bio should be Markdown enabled with the
``mediagoblin.util.cleaned_markdown_conversion()`` function.

Proposal:


-  Add a field to User (``mediagoblin/db/models.py``) which is
   named ``bio_html`` (see the description\_html field in
   ``MediaEntry`` [same file] for refernce).
-  When the user updates the bio field
   (``mediagoblin/edit/views.py:edit_profile()``), run the
   ``cleaned_markdown_conversion()`` and put the output in the
   ``bio_html`` field.
-  Edit ``mediagoblin/templates/mediagoblin/utils/profile.html`` to
   output ``user.bio_html`` instead of ``user.bio`` and to NOT
   autoescape the output of ``{{ user.bio_html }}`` (see
   @mediagoblin/templates/mediagoblin/user\_pages/media.html for
   reference).



Change History (6)

comment:1 by joar, 13 years ago

Milestone: 0.0.4

comment:1 by Aaron Williamson, 13 years ago

Owner: set to Aaron Williamson
Status: NewResolved
I implemented this as described in Joar's request (exactly as we do
for media descriptions). Public repository is
`here <https://gitorious.org/~copiesofcopies/mediagoblin/copiesofcopies-mediagoblin>`_,
and the patch is in branch "feature410\_markdown\_bio".



comment:2 by Christopher Allan Webber, 13 years ago

Status: ResolvedFeedback
Moving state to "feedback", which I will try to give tonight.



comment:3 by Christopher Allan Webber, 13 years ago

So this looks good. Two things:


-  Would be best to just use util.cleaned\_markdown\_conversion()
-  We could use a migration, but my bad... I need to merge the
   migrations stuff. Working on that now.



comment:4 by Christopher Allan Webber, 13 years ago

Status: FeedbackClosed
I did this, and added this as the first migration in our glorious
new migrations future.

Horray! Thanks Aaron! I'm excited about this change, and it was a
good excuse to do a simple first migration.



comment:5 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/410 .
Relations:
#337: related

Note: See TracTickets for help on using tickets.