Added support for reStructuredText markup in bios.
- Legacy-Id: 11284
This commit is contained in:
parent
aa4ddc00e2
commit
9e382bb711
|
@ -27,7 +27,7 @@ class PersonInfo(models.Model):
|
|||
ascii_short = models.CharField("Abbreviated Name (ASCII)", max_length=32, null=True, blank=True, help_text="Example: A. Nonymous. Fill in this with initials and surname only if taking the initials and surname of the ASCII name above produces an incorrect initials-only form. (Blank is OK).")
|
||||
affiliation = models.CharField(max_length=255, blank=True, help_text="Employer, university, sponsor, etc.")
|
||||
address = models.TextField(max_length=255, blank=True, help_text="Postal mailing address.")
|
||||
biography = models.TextField(blank=True, help_text="Short biography for use on leadership pages.")
|
||||
biography = models.TextField(blank=True, help_text="Short biography for use on leadership pages. Use plain text or reStructuredText markup.")
|
||||
photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTOS_DIRNAME,blank=True)
|
||||
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(location=settings.PHOTOS_DIR),upload_to=settings.PHOTOS_DIRNAME,blank=True)
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@ INSTALLED_APPS = (
|
|||
'form_utils',
|
||||
'tastypie',
|
||||
'widget_tweaks',
|
||||
'django_markup',
|
||||
# IETF apps
|
||||
'ietf.api',
|
||||
'ietf.community',
|
||||
|
@ -626,6 +627,20 @@ TRAC_ADMIN_CMD = "/usr/bin/trac-admin"
|
|||
TRAC_WIKI_DIR = "/a/www/www6s/trac"
|
||||
TRAC_SVN_DIR = "/a/svn/group"
|
||||
|
||||
MARKUP_SETTINGS = {
|
||||
'restructuredtext': {
|
||||
'settings_overrides': {
|
||||
'initial_header_level': 3,
|
||||
'doctitle_xform': False,
|
||||
'footnote_references': 'superscript',
|
||||
'trim_footnote_reference_space': True,
|
||||
'default_reference_context': 'view',
|
||||
'link_base': ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Put the production SECRET_KEY in settings_local.py, and also any other
|
||||
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
|
||||
from settings_local import * # pyflakes:ignore
|
||||
|
@ -651,3 +666,4 @@ if SERVER_MODE != 'production':
|
|||
if 'SECRET_KEY' not in locals():
|
||||
SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'
|
||||
ALLOWED_HOSTS = ['*',]
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{# Copyright The IETF Trust 2015, All Rights Reserved #}
|
||||
{% load origin %}
|
||||
{% load markup_tags %}
|
||||
|
||||
{% block title %}Profile for {{ person }}{% endblock %}
|
||||
|
||||
|
@ -11,7 +12,7 @@
|
|||
|
||||
<div class="bio-text">
|
||||
<img class="bio-photo" src="{{ person.photo.url }}" alt="Photo of {{ person }}" />
|
||||
{{ person.biography }}
|
||||
{{ person.biography | apply_markup:"restructuredtext" }}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -7,6 +7,7 @@ decorator>=3.4.0
|
|||
defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency
|
||||
Django>=1.7.10,<1.8
|
||||
django-bootstrap3>=5.1.1,<7.0.0 # django-bootstrap 7.0 requires django 1.8
|
||||
django-markup>=1.1
|
||||
django-tastypie>=0.13.1
|
||||
django-widget-tweaks>=1.3
|
||||
docutils>=0.12
|
||||
|
|
Loading…
Reference in a new issue