Opened 15 years ago
Last modified 15 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 , 15 years ago
| Milestone: | → 0.0.4 |
|---|
comment:1 by , 15 years ago
| Owner: | set to |
|---|---|
| Status: | New → Resolved |
comment:2 by , 15 years ago
| Status: | Resolved → Feedback |
|---|
Moving state to "feedback", which I will try to give tonight.
comment:3 by , 15 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 , 15 years ago
| Status: | Feedback → Closed |
|---|
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 , 14 years ago
The original url for this bug was http://bugs.foocorp.net/issues/410 .
Relations:
#337: related

I implemented this as described in Joar's request (exactly as we do for media descriptions). Public repository is here, and the patch is in branch "feature410_markdown_bio".