Files
edx-platform/common/djangoapps/student/text_me_the_app.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

24 lines
598 B
Python

"""
Fragment for rendering text me the app.
"""
from django.template.loader import render_to_string
from web_fragments.fragment import Fragment
from openedx.core.djangoapps.plugin_api.views import EdxFragmentView
class TextMeTheAppFragmentView(EdxFragmentView):
"""
A fragment to text me the app.
In future we can add this to learner dashboard.
"""
def render_to_fragment(self, request, **kwargs):
"""
Render text me the app fragment.
"""
html = render_to_string('learner_dashboard/text-me-fragment.html', {})
return Fragment(html)