- Docker: v18.06.0+
- Docker Compose: v1.22.0+
- Ports 80 and 443 should be open
- Hardware:
- Minimum configuration: 4 GB RAM, 2 CPU, 8 GB disk space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def get_access_token_detail(): | |
""" | |
This return the access token | |
""" | |
api_url = "https://lms.com/oauth2/access_token" | |
data = { | |
'grant_type': "client_credentials", |
direnv setup on Ubuntu
direnv
is an extension for your shell. It augments existing shells with a new feature that can load and unload environment variables depending on the current directory.
- Load 12factor apps environment variables
- Create per-project isolated development environments
- Load secrets for deployment
The robots.txt file is a standard text file that tells search engine crawlers which pages they can access, scrape, and ultimately list in their search engine results.
The file is listed on the root URL of your site, https://domain.com/robots.txt, and can easily be added to your Django project.
Be sure to use the correct casing and spelling for anything added to the robots.txt file or it will not work correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from student.views import compose_and_send_activation_email | |
user = User.objects.get(email='[email protected]') | |
compose_and_send_activation_email(user, user.profile) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xmodule.modulestore.django import modulestore | |
from opaque_keys.edx.keys import CourseKey | |
course_id = 'course-v1:edX+DemoX+Demo_Course' | |
course = modulestore().get_course(CourseKey.from_string(course_id)) |