GithubHelp home page GithubHelp logo

projecttier / projecttier.org Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 15.0 18.81 MB

Wagtail website for Project TIER

Home Page: https://www.projecttier.org/

License: GNU Affero General Public License v3.0

Shell 0.11% Python 69.80% HTML 17.22% CSS 0.13% JavaScript 1.29% Dockerfile 0.09% SCSS 11.36% Procfile 0.01%
wagtail education research django agpl python3

projecttier.org's People

Contributors

alexgleason avatar andrewcroce avatar dependabot[bot] avatar hminnovation avatar kaedroho avatar marykatefain avatar mattmcmanus avatar nicklee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

projecttier.org's Issues

Remove "links" app

I'm not sure what the purpose of this app originally was, but it seems unused in the code aside from the fact it's listed under INSTALLED_APPS. I think we should just delete it. This is the only code in the app:

from django.db import models
from wagtail.admin.edit_handlers import (
    FieldPanel, MultiFieldPanel, PageChooserPanel
)
from wagtail.documents.edit_handlers import DocumentChooserPanel


class LinkFields(models.Model):
    """
    RelatedLink inherits this. Otherwise unused.
    """
    link_external = models.URLField("External link", blank=True)
    link_page = models.ForeignKey(
        'wagtailcore.Page',
        null=True,
        blank=True,
        related_name='+',
        on_delete=models.DO_NOTHING  # FIXME: possibly not ideal
    )
    link_document = models.ForeignKey(
        'documents.Document',
        null=True,
        blank=True,
        related_name='+',
        on_delete=models.DO_NOTHING  # FIXME: possibly not ideal
    )

    @property
    def link(self):
        if self.link_page:
            return self.link_page.url
        elif self.link_document:
            return self.link_document.file.url
        else:
            return self.link_external

    panels = [
        FieldPanel('link_external'),
        PageChooserPanel('link_page'),
        DocumentChooserPanel('link_document'),
    ]

    class Meta:
        abstract = True


class RelatedLink(LinkFields):
    """
    Unused. Unclear what it's for.
    """
    title = models.CharField(max_length=255, help_text="Link title")

    panels = [
        FieldPanel('title'),
        MultiFieldPanel(LinkFields.panels, "Link"),
    ]

    class Meta:
        abstract = True

Admin UI issues

This was previously using wagtailatomicadmin but the latest version of Wagtail broke it beyond the point of repair. Unfortunately the default Wagtail styles are also pretty broken:

screenshot from 2018-02-04 19 51 45

I'll need to either update wagtailatomicadmin or send a PR to Wagtail itself. I'm feeling the latter will be a better option at this point.

Redirect TIER Protocol 4.0 URLs

Time estimate: 1hr

A new protocol is planned to be added, and we need to create URLs that accommodate multiple protocols on the site. I think a URL structure with the version number in the URL should be a good solution, but we need to redirect old URLs to use this new format.

Top nav breakpoint is not ideal

screenshot from 2019-01-22 17 19 58

There's a point where the top nav has too many links, but it doesn't collapse into the mobile view. Seems to be at around 1010px. Doesn't seem to be an easy place to adjust this, but it should definitely collapse into the mobile view sooner.

Redirect to SSL

This is a weird problem to solve in Heroku since I can't access the outer web server, but I managed to find SECURE_SSL_REDIRECT which does this on a Django level. It should work for now.

Write tests for existing code

It looks like there are some tests, but they're pretty broken. They're using nose which I've never touched before. They're also not at all comprehensive. Not sure the best way to approach the current tests yet.

Set up email

Currently, email is not enabled on projecttier.org.

  1. This prevents "I forgot my password" from working - it cannot send you the recovery email.
  2. This prevents website errors from being reported to us.

Adding this would make #62 less bad, since we'd be notified immediately when a user tries to visit a broken link, rather than learning too late that it's happening.

I've set up an account on Postmark for TIER to send emails, but we need to verify it with the domain name before we can enable it. Then we'll just need to update the site settings to use Postmark's email info.

Add "Join the Network" card to TIER Network

• Design and generate a “ghost card” to display on the TIER Network page encouraging others
to “Join the Network”
• Make the TIER Logo the default image if someone does not have a picture on the Network and
People pages

Link checker crashes

Sadly, we're running into Heroku's 30 second request timeout again I think. This is frustratingly limiting.

Settings > Link Checker now appears on the production site, but trying to run the scan results in this:

2018-09-27T00:40:52.792633+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/admin/link-checker/scan/" host=www.projecttier.org request_id=f34f2083-3ca1-423c-97e2-9c7786b3c2ba fwd="71.230.111.204" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2018-09-27T00:40:53.524928+00:00 app[web.1]: [2018-09-27 00:40:53 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:12)
2018-09-27T00:40:53.526810+00:00 app[web.1]: [2018-09-26 20:40:53 -0400] [12] [INFO] Worker exiting (pid: 12)
2018-09-27T00:40:53.763977+00:00 app[web.1]: [2018-09-27 00:40:53 +0000] [20] [INFO] Booting worker with pid: 20

Footer overlaps top bar

Estimated time: 30 mins.

screenshot from 2018-11-13 14 40 47

Steps to reproduce:

  1. If you have a big screen, shrink the height of your browser window.
  2. Scroll to the bottom of any page.

What happens:

The top navigation bar is behind the footer container. Like, maybe a z-index issue? This is worsened by the fact that dropdown menus are inaccessible.

Expected result:

The top navigation is on top of the footer container.

Create Unique URLS for Course Materials

Each Course Material card should have a unique link users may access to go directly to the card (for example, sharing among professions "hey, check out this one... /course-materials/econometrics"

An anchor link is probably fine for this rather than a whole page template. Anchor link should open the modal.

Add a favicon

I noticed the live site doesn't have a favicon. We should add one.

screenshot from 2018-04-23 16 35 02

fix ReadMe

Remove docker stuff
Instruct to use vagrant

Add analytics dashboard

I want to implement tomdyson/wagalytics. Unfortunately there are some issues:

  • wagalytics needs to support Wagtail 2.0 (I sent a PR tomdyson/wagalytics#22)
  • wagalytics needs to support setting the key from an environment variable (tomdyson/wagalytics#14) so I can deploy to Heroku and keep the key out of the repo
  • I need to get the analytics-key.json but don't know how (tomdyson/wagalytics#21)
  • A new version of wagalytics needs to be deployed with these fixes
  • I need to get the GA_VIEW_ID
  • I need Project TIER to grant me access to their GA account so I can obtain these things once I do know how
  • The service account's email address needs to be added to the GA view by Project TIER

Runtime warnings

This happens when the server starts:

WARNINGS:
events.EventPage: EventPage.search_fields contains field 'location' but it doesn't exist
people.FellowPersonPage: FellowPersonPage.search_fields contains field 'job_titles' but it doesn't exist
people.PersonPage: PersonPage.search_fields contains field 'job_titles' but it doesn't exist

Error on Previewing pages

File "/vagrant/project_tier/home/templatetags/navigation_tags.py", line 12, in get_site_root
    return context['request'].site.root_page
AttributeError: 'WSGIRequest' object has no attribute 'site'

Draftail tip updates

Estimated time: 21 hrs

  • Get links working inside modals. (12 hrs)
  • Ability to set the tip title. (6 hrs)
  • Set background color of tips. (3 hrs)

Add tests to person pages

The person pages are now Django models rather than Wagtail pages, so they should have a special set of tests that wouldn't be covered by simply testing Page.

Person name isn't shown in page title / browser tab

Just noticed that Person views for an individual person don't properly display their name in the title:

screenshot from 2019-02-17 14 41 58

The person's name should show before the first pipe, like:

Bernadette Lanciaux | Project TIER | Teaching Integrity in Empirical Research

...in this example.

Academic title in Network section is huge

screenshot from 2019-02-17 14 31 46

Example ^

I didn't notice this before because no other Person objects have this property filled out. Even the ones who have an academic title list it in the "job title" field.

Need to simply style this like normal text in this context.

Make RichText image alignment work on the front-end

When you create an image in the RichText editor, it gives you the options of: left-aligned, right-aligned, and full width.

Unfortunately these options aren't respected by the front-end because there is no CSS for them. Create the necessary CSS so this features works properly.

Increase max upload filesize

So I'm making some dummy files like so:

fallocate -l 100M dummy

-l means "length" which you can specify in human readable terms like 10M, 5G etc.

So far I tried uploading:

  • 10MB - pass
  • 20MB - pass
  • 100MB - fail

I'm not sure how large of files the TIER team needs to upload. I also need to investigate where it's coming from... ie Heroku, Django, gunicorn, or AWS.

Include local development environment without Vagrant

I think we need either:

  1. Manual setup instructions without Vagrant, ie install postgres, make a virtualenv, etc, or:
  2. A docker-based local dev environment like dev.sh

Otherwise @marykatefain won't be able to develop on this project since Vagrant requires virtualization and the T400 with libreboot has issues with virtualization.

Internal Server Error on password reset

2018-05-20T22:40:54.717349+00:00 app[web.1]: Internal Server Error: /admin/password_reset/

2018-05-20T22:40:54.717372+00:00 app[web.1]: Traceback (most recent call last):

2018-05-20T22:40:54.717374+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner

2018-05-20T22:40:54.717375+00:00 app[web.1]:     response = get_response(request)

2018-05-20T22:40:54.717401+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response

2018-05-20T22:40:54.717403+00:00 app[web.1]:     response = self.process_exception_by_middleware(e, request)

2018-05-20T22:40:54.717404+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response

2018-05-20T22:40:54.717406+00:00 app[web.1]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)

2018-05-20T22:40:54.717407+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/views/decorators/cache.py", line 31, in _cache_controlled

2018-05-20T22:40:54.717408+00:00 app[web.1]:     response = viewfunc(request, *args, **kw)

2018-05-20T22:40:54.717409+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/wagtail/admin/urls/__init__.py", line 95, in wrapper

2018-05-20T22:40:54.717411+00:00 app[web.1]:     return view_func(request, *args, **kwargs)

2018-05-20T22:40:54.717412+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/wagtail/admin/views/account.py", line 88, in wrapper

2018-05-20T22:40:54.717413+00:00 app[web.1]:     return view_func(*args, **kwargs)

2018-05-20T22:40:54.717414+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/decorators.py", line 142, in _wrapped_view

2018-05-20T22:40:54.717415+00:00 app[web.1]:     response = view_func(request, *args, **kwargs)

2018-05-20T22:40:54.717416+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/views.py", line 277, in password_reset

2018-05-20T22:40:54.717418+00:00 app[web.1]:     form.save(**opts)

2018-05-20T22:40:54.717419+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/forms.py", line 297, in save

2018-05-20T22:40:54.717420+00:00 app[web.1]:     email, html_email_template_name=html_email_template_name,

2018-05-20T22:40:54.717421+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/forms.py", line 251, in send_mail

2018-05-20T22:40:54.717422+00:00 app[web.1]:     email_message.send()

2018-05-20T22:40:54.717423+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/message.py", line 294, in send

2018-05-20T22:40:54.717425+00:00 app[web.1]:     return self.get_connection(fail_silently).send_messages([self])

2018-05-20T22:40:54.717426+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 103, in send_messages

2018-05-20T22:40:54.717427+00:00 app[web.1]:     new_conn_created = self.open()

2018-05-20T22:40:54.717428+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 63, in open

2018-05-20T22:40:54.717429+00:00 app[web.1]:     self.connection = self.connection_class(self.host, self.port, **connection_params)

2018-05-20T22:40:54.717430+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/smtplib.py", line 251, in __init__

2018-05-20T22:40:54.717431+00:00 app[web.1]:     (code, msg) = self.connect(host, port)

2018-05-20T22:40:54.717433+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/smtplib.py", line 336, in connect

2018-05-20T22:40:54.717434+00:00 app[web.1]:     self.sock = self._get_socket(host, port, self.timeout)

2018-05-20T22:40:54.717435+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/smtplib.py", line 307, in _get_socket

2018-05-20T22:40:54.717436+00:00 app[web.1]:     self.source_address)

2018-05-20T22:40:54.717437+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/socket.py", line 724, in create_connection

2018-05-20T22:40:54.717439+00:00 app[web.1]:     raise err

2018-05-20T22:40:54.717440+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/socket.py", line 713, in create_connection

2018-05-20T22:40:54.717441+00:00 app[web.1]:     sock.connect(sa)

2018-05-20T22:40:54.717449+00:00 app[web.1]: ConnectionRefusedError: [Errno 111] Connection refused

Create Landing Form Page

We should create a "landing page" to which the Water Bottle ad on the front page can direct people (as well as other links through the website).

The purpose of this page is to direct users to take at least one of the surveys, depending on their use of TIER.

Some People Page template bugs

  1. The "Fellows" heading is too low down, decrease margin

  2. Clicking the Advisory Board tag goes to the AB section, but highlights Project Directors in the tree:

screenshot from 2018-09-19 14 22 42

Cannot create StandardPage beneath HomePage

Logs:

2018-12-18T23:32:03.677204+00:00 app[web.1]: Internal Server Error: /soup-nuts-exercises/

2018-12-18T23:32:03.677227+00:00 app[web.1]: Traceback (most recent call last):

2018-12-18T23:32:03.677231+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner

2018-12-18T23:32:03.677232+00:00 app[web.1]:     response = get_response(request)

2018-12-18T23:32:03.677234+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response

2018-12-18T23:32:03.677236+00:00 app[web.1]:     response = self.process_exception_by_middleware(e, request)

2018-12-18T23:32:03.677238+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response

2018-12-18T23:32:03.677239+00:00 app[web.1]:     response = response.render()

2018-12-18T23:32:03.677240+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 106, in render

2018-12-18T23:32:03.677241+00:00 app[web.1]:     self.content = self.rendered_content

2018-12-18T23:32:03.677243+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content

2018-12-18T23:32:03.677244+00:00 app[web.1]:     content = template.render(context, self._request)

2018-12-18T23:32:03.677246+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render

2018-12-18T23:32:03.677248+00:00 app[web.1]:     return self.template.render(context)

2018-12-18T23:32:03.677249+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 171, in render

2018-12-18T23:32:03.677251+00:00 app[web.1]:     return self._render(context)

2018-12-18T23:32:03.677252+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2018-12-18T23:32:03.677253+00:00 app[web.1]:     return self.nodelist.render(context)

2018-12-18T23:32:03.677255+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2018-12-18T23:32:03.677256+00:00 app[web.1]:     bit = node.render_annotated(context)

2018-12-18T23:32:03.677257+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2018-12-18T23:32:03.677259+00:00 app[web.1]:     return self.render(context)

2018-12-18T23:32:03.677260+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render

2018-12-18T23:32:03.677262+00:00 app[web.1]:     return compiled_parent._render(context)

2018-12-18T23:32:03.677263+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2018-12-18T23:32:03.677264+00:00 app[web.1]:     return self.nodelist.render(context)

2018-12-18T23:32:03.677265+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2018-12-18T23:32:03.677267+00:00 app[web.1]:     bit = node.render_annotated(context)

2018-12-18T23:32:03.677268+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2018-12-18T23:32:03.677269+00:00 app[web.1]:     return self.render(context)

2018-12-18T23:32:03.677270+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render

2018-12-18T23:32:03.677272+00:00 app[web.1]:     return compiled_parent._render(context)

2018-12-18T23:32:03.677273+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2018-12-18T23:32:03.677274+00:00 app[web.1]:     return self.nodelist.render(context)

2018-12-18T23:32:03.677275+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2018-12-18T23:32:03.677277+00:00 app[web.1]:     bit = node.render_annotated(context)

2018-12-18T23:32:03.677278+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2018-12-18T23:32:03.677279+00:00 app[web.1]:     return self.render(context)

2018-12-18T23:32:03.677280+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 62, in render

2018-12-18T23:32:03.677282+00:00 app[web.1]:     result = block.nodelist.render(context)

2018-12-18T23:32:03.677283+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2018-12-18T23:32:03.677285+00:00 app[web.1]:     bit = node.render_annotated(context)

2018-12-18T23:32:03.677286+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2018-12-18T23:32:03.677287+00:00 app[web.1]:     return self.render(context)

2018-12-18T23:32:03.677288+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 62, in render

2018-12-18T23:32:03.677289+00:00 app[web.1]:     result = block.nodelist.render(context)

2018-12-18T23:32:03.677290+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2018-12-18T23:32:03.677291+00:00 app[web.1]:     bit = node.render_annotated(context)

2018-12-18T23:32:03.677292+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2018-12-18T23:32:03.677293+00:00 app[web.1]:     return self.render(context)

2018-12-18T23:32:03.677295+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/library.py", line 214, in render

2018-12-18T23:32:03.677296+00:00 app[web.1]:     _dict = self.func(*resolved_args, **resolved_kwargs)

2018-12-18T23:32:03.677297+00:00 app[web.1]:   File "/app/project_tier/home/templatetags/navigation_tags.py", line 93, in table_of_contents_menu

2018-12-18T23:32:03.677298+00:00 app[web.1]:     'section_pages': section.get_children().specific().live(),

2018-12-18T23:32:03.677305+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'get_children'

Internal server error upon viewing members

2019-02-07T14:53:36.052321+00:00 app[web.1]: Internal Server Error: /person/farguillas/

2019-02-07T14:53:36.052339+00:00 app[web.1]: Traceback (most recent call last):

2019-02-07T14:53:36.052349+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner

2019-02-07T14:53:36.052351+00:00 app[web.1]:     response = get_response(request)

2019-02-07T14:53:36.052356+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response

2019-02-07T14:53:36.052358+00:00 app[web.1]:     response = self.process_exception_by_middleware(e, request)

2019-02-07T14:53:36.052359+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response

2019-02-07T14:53:36.052361+00:00 app[web.1]:     response = response.render()

2019-02-07T14:53:36.052362+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 106, in render

2019-02-07T14:53:36.052363+00:00 app[web.1]:     self.content = self.rendered_content

2019-02-07T14:53:36.052364+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content

2019-02-07T14:53:36.052366+00:00 app[web.1]:     content = template.render(context, self._request)

2019-02-07T14:53:36.052367+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render

2019-02-07T14:53:36.052368+00:00 app[web.1]:     return self.template.render(context)

2019-02-07T14:53:36.052369+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 171, in render

2019-02-07T14:53:36.052370+00:00 app[web.1]:     return self._render(context)

2019-02-07T14:53:36.052371+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2019-02-07T14:53:36.052372+00:00 app[web.1]:     return self.nodelist.render(context)

2019-02-07T14:53:36.052373+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2019-02-07T14:53:36.052374+00:00 app[web.1]:     bit = node.render_annotated(context)

2019-02-07T14:53:36.052376+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2019-02-07T14:53:36.052377+00:00 app[web.1]:     return self.render(context)

2019-02-07T14:53:36.052378+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render

2019-02-07T14:53:36.052380+00:00 app[web.1]:     return compiled_parent._render(context)

2019-02-07T14:53:36.052381+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2019-02-07T14:53:36.052382+00:00 app[web.1]:     return self.nodelist.render(context)

2019-02-07T14:53:36.052383+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2019-02-07T14:53:36.052384+00:00 app[web.1]:     bit = node.render_annotated(context)

2019-02-07T14:53:36.052385+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2019-02-07T14:53:36.052386+00:00 app[web.1]:     return self.render(context)

2019-02-07T14:53:36.052387+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render

2019-02-07T14:53:36.052389+00:00 app[web.1]:     return compiled_parent._render(context)

2019-02-07T14:53:36.052390+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 163, in _render

2019-02-07T14:53:36.052391+00:00 app[web.1]:     return self.nodelist.render(context)

2019-02-07T14:53:36.052392+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 937, in render

2019-02-07T14:53:36.052393+00:00 app[web.1]:     bit = node.render_annotated(context)

2019-02-07T14:53:36.052394+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated

2019-02-07T14:53:36.052395+00:00 app[web.1]:     return self.render(context)

2019-02-07T14:53:36.052396+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/django/template/library.py", line 192, in render

2019-02-07T14:53:36.052397+00:00 app[web.1]:     output = self.func(*resolved_args, **resolved_kwargs)

2019-02-07T14:53:36.052399+00:00 app[web.1]:   File "/app/project_tier/home/templatetags/navigation_tags.py", line 13, in get_site_root

2019-02-07T14:53:36.052400+00:00 app[web.1]:     return page.get_site().root_page

2019-02-07T14:53:36.052401+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'get_site'

2019-02-07T14:53:36.052985+00:00 app[web.1]: 10.47.207.66 - - [07/Feb/2019:09:53:36 -0500] "GET /person/farguillas/ HTTP/1.1" 500 805 "https://www.projecttier.org/tier-network/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"

2019-02-07T14:53:36.292741+00:00 app[web.1]: Internal Server Error: /favicon.ico

2019-02-07T14:53:36.297398+00:00 app[web.1]: 10.47.207.66 - - [07/Feb/2019:09:53:36 -0500] "GET /favicon.ico HTTP/1.1" 500 805 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"

Let editors insert inline buttons which pop up a modal window containing a rich text field

For various reasons, sometimes there is content that may pertain to only some readers, or is tangential to the topic at hand. We want the ability to create a special link that readers can click to pop up a modal window with this information.

The link should not look like a normal hyperlink, but not like a button either. Here's an example of what it could look like:


screenshot from 2018-11-13 15 25 33

.modal-link {
    background: #1d7ac9;
    padding: 1px 5px;
    border-radius: 9999px;
    color: white;
}
.modal-link::before {
    content: '🛈';
    margin-right: 3px;
    transform: translateY(-1px);
    display: inline-block;
}

Clicking it should pop up a modal, similar to one of these:

screenshot from 2018-11-13 15 27 45

This is a Foundation 6 Reveal.


This needs to be represented somehow in the Wagtail page editor. This is possible by extending Draftail (Wagtail 2.3 docs) to include a new button. That button should pop-up a custom Modal Workflow, which lets us configure the link and enter rich text, then it gets saved into the editor.

We'll also likely need to write a templatetag or filter to render it on the page.

Add a button to the Rich Text Editor which creates a "Tip Modal"

• Insert a new button in the editor
• Make clicking the button spawn a dialog
• Create a hover tag that previews the content, and respective form field
• Handle behavior so that saving the dialog window saves the content into the page model
• Handle reopening the dialog and loading the saved content back in
• Figuring out (and implementing) the correct database representation for tip content
• Rendering the tip content on the front-end (technical aspects)
• Designing the rendered tip (html, css, design)
• Writing tests

TIER Network updates

Time estimate: 12 hrs

  • Redesign layout to accommodate more people at once.
    • Use small circle avatar instead of giant photo.
    • Emphasize new people.
      • Add a “joined on” hidden date field. A member is considered “new” if their join date is
        within the past 3 months.
      • New people are sorted alphabetically at the top of the list, and others are sorted
        alphabetically immediately following.
      • New members each have a “New member!” tag to distinguish them.
    • Create mockups
      • Try to achieve 2 lines per person, wide layout (Rich)
      • Experiment with 3-column layout

EDIT: I forgot to add Norm's comment:

With respect to the TIER Network, please only show us a mockup of the 2 line per person layout (Richard's vision). We feel that this is the way we want to go.

Exercises page PDF doesn't show up in FireFox on Windows

On Norm's computer we couldn't get the PDF to render in the exercises page. I've just tested it in FireFox on Windows 7 and it showed up fine. Trying to pinpoint what exactly was happening on Norm's computer so we can handle it. At worst, we might have to rethink how we're embedding PDFs.

I've set Content-Disposition: inline in the HTTP header of the PDF. One would think this is enough. I'm trying to reproduce the problem, but can't.

It was happening at this URL (and others like it): https://project-tier-dev.herokuapp.com/tier-classroom/sample-exercises/sample-exercises/alcohol-exercise/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.