projecttier / projecttier.org Goto Github PK
View Code? Open in Web Editor NEWWagtail website for Project TIER
Home Page: https://www.projecttier.org/
License: GNU Affero General Public License v3.0
Wagtail website for Project TIER
Home Page: https://www.projecttier.org/
License: GNU Affero General Public License v3.0
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
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:
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.
snyk is saying there's 12 security vulnerabilities, 3 critical. Dependencies need to be updated.
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.
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.
No front end design accounted for Academic Title apparently... Looks bad in card.
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.
Currently, email is not enabled on projecttier.org.
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.
It looks like exporting spreadsheets via Google Analytics is kind of hard. If we could add a button to Wagalytics ourself that does this, it would be very nice.
• 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
Students can potentially view the answers to problems given out by teachers on the TIER website. Look into ways to prevent this.
Estimated time: 30 min
Remove the water bottle ad from the homepage and add it to the footer.
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
Estimated time: 30 mins.
Steps to reproduce:
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.
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.
Remove docker stuff
Instruct to use vagrant
I want to implement tomdyson/wagalytics. Unfortunately there are some issues:
analytics-key.json
but don't know how (tomdyson/wagalytics#21)GA_VIEW_ID
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
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'
There should still be some way for mobile users to filter the exercises
There's an embedded MailChimp widget on the homepage. A lot of spam accounts are signing up on it. We should prevent them from doing so if possible.
Estimated time: 21 hrs
Ex the course levels, subjects, etc.
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.
Create a CourseMaterialPage and CourseMaterialIndexPage type where site editors can publish course
materials in a uniform way.
Already applied to CMs, just do the same for Exercises,
The ad should prominently feature the free water bottle to entice users to click, and direct users to the Survey Landing Page (#10)
Project TIER wants to generate reports over a period of time, eg Jan '17 to Dec' 17. This requires Google Analytics data from all time, opposed to the 30 day limit arbitrarily hardcoded into Wagalytics.
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.
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:
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.
I think we need either:
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.
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
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.
Take this URL for instance: https://www.projecttier.org/tier-protocol/specifications/#the-read-me-file
It should take you to around like here:
But in reality the user ends up around here:
This is happening because the anchor is lining up to the very top of the page despite it being covered by the absolutely-positioned top navigation bar. Instead it needs to be scrolled down by at least height of the navbar.
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'
Otherwise the following error occurs:
'NoneType' object has no attribute 'get_children'
Add an additional tag category to Exercises, “Software”
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"
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:
.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:
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.
• 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
Time estimate: 12 hrs
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.
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/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.