Add course landing pages with registration forms #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds marketing-focused landing pages for courses at
/<course_slug>/aboutwith integrated registration forms. These pages are publicly accessible and provide rich content about courses while allowing prospective students to register for updates.Key Features
1. Course State Management
Introduced a new
CourseStatesystem to replace the simplefinishedboolean:When a course is in REGISTRATION state, accessing
/<course_slug>/redirects to the landing page, except for superusers who can preview the course workspace.2. Landing Page (
/<course_slug>/about)Each course can now have a dedicated landing page with:
about_content) - Rich course descriptions with formatting, lists, headers, etc.video_url) - Course overview videoshero_image_url) - Eye-catching banner images3. Registration System
New
CourseRegistrationmodel captures:The form includes duplicate prevention and automatically determines the region from the selected country.
4. Mailchimp Integration
Automatic newsletter subscription with:
MAILCHIMP_TOKEN,MAILCHIMP_LIST_ID, and per-coursemailchimp_tag5. Admin Interface Updates
Enhanced Django admin with:
Implementation Details
Models
Views
course_landing_view(): Renders the landing page with markdown-to-HTML conversion, YouTube video ID extraction, and registration form handlingcourse_view(): Updated to redirect to landing page when course is in REGISTRATION state (except for superusers)course_list(): Updated to display courses grouped by state (Registration Open, Active, Finished)Dependencies
Added
markdownpackage for rendering rich content withextraandcodehiliteextensions.Testing
17 new tests added in
test_landing_page.pycovering:watch?v=andyoutu.be/)All existing tests pass (14 tests in
test_course.py) ensuring no regression.Screenshots
Course List with Registration Section
The course list now shows courses grouped by state, with "Registration Open" courses displayed prominently at the top.
Landing Page with Rendered Markdown
The landing page displays rich markdown content with proper formatting, headings, lists, and bold text. YouTube videos are embedded, and the registration form is displayed below the content.
Registration Form Filled
The registration form includes all required fields with a searchable country dropdown containing 227 countries.
Registration Success
After successful registration, users see a confirmation message and the form is reset. Registrations are saved to the database and subscribers are added to Mailchimp in the background.
Usage
Setting Up a Course Landing Page
REGISTRATIONin the adminabout_contentfieldmailchimp_tagfor newsletter segmentation/<course_slug>/aboutViewing Registrations
Access the CourseRegistration admin to:
Notes
finishedfield is kept for backward compatibility but should be deprecated in favor ofstateMAILCHIMP_TOKENandMAILCHIMP_LIST_IDcourses/constants.pyWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.shcurl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Add course landing pages with registration forms to the course management platform</issue_title>
<issue_description># Course Landing Page - Product Specification
Overview
Add marketing-focused landing pages for each course at
/<course_slug>/about, separate from the existing course workspace at/<course_slug>/. Both pages are publicly accessible with no forced redirects - keeping things simple and transparent.Key Design Principles
✅ Simple - No complex authentication/enrollment redirects
✅ Transparent - Everyone can see course content
✅ Clear CTAs - Obvious enrollment prompts for non-enrolled users
✅ Flexible - Users can freely navigate between landing page and workspace
Goals
/<course_slug>/about)/<course_slug>/)Implementation details
Course state
Instead of "course_finished" create course_state with 3 states: REGISTRATION, ACTIVE, FINISHED
When the course is in the registration state, the click on the course should bring to the sign-up about page (with redirect)
When course is active, should be usual /course/ page
To see the usual course page when the course is in the registration state, users (superuser status) will be able to see the actual course page to check that things look correct
About page
It should contain markdown content for marketing purposes
at the end there's a register form with the following fields:
Email (if signed up, show their email and don't let them change it)
Name
Country
Role
What best describes you?
Data Engineer
Data Scientist
Data Analyst
ML Engineer
Software Engineer (Backend)
Software Engineer (Frontend, Test, etc)
Student (STEM)
Student (Non-STEM)
Other
Comment: Anything you would like to add?
Countries: (don't show the region, but have it in the model)
it should be a dropdown list with possibility to type to see narrowed down list of options
country,region
Algeria,Africa
Angola,Africa
Benin,Africa
Botswana,Africa
Burkina Faso,Africa
Burundi,Africa
Cabo Verde,Africa
Cameroon,Africa
Central African Republic,Africa
Chad,Africa
Comoros,Africa
Congo,Africa
Democratic Republic of the Congo,Africa
Cote d'Ivoire,Africa
Djibouti,Africa
Egypt,Africa
Equatorial Guinea,Africa
Eritrea,Africa
Eswatini,Africa
Ethiopia,Africa
Gabon,Africa
Gambia,Africa
Ghana,Africa
Guinea,Africa
Guinea-Bissau,Africa
Kenya,Africa
Lesotho,Africa
Liberia,Africa
Libya,Africa
Madagascar,Africa
Malawi,Africa
Mali,Africa
Mauritania,Africa
Mauritius,Africa
Morocco,Africa
Mozambique,Africa
Namibia,Africa
Niger,Africa
Nigeria,Africa
Rwanda,Africa
Sao Tome and Principe,Africa
Senegal,Africa
Seychelles,Africa
Sierra Leone,Africa
Somalia,Africa
South Africa,Africa
South Sudan,Africa
Sudan,Africa
Tanzania,Africa
Togo,Africa
Tunisia,Africa
Uganda,Africa
Zambia,Africa
Zimbabwe,Africa
Canada,North America
United States,North America
United States of America,North America
Mexico,North America
Bermuda,North America
Greenland,North America
Saint Pierre and Miquelon,North America
Belize,North America
Costa Rica,North America
El Salvador,North America
Guatemala,North America
Honduras,North America
Nicaragua,North America
Panama,North America
Cuba,North America
Dominican Republic,North America
Haiti,North America
Jamaica,North America
Trinidad and Tobago,North America
Barbados,North America
Bahamas,North America
Grenada,North America
Saint Lucia,North America
Saint Vincent and the Grenadines,North America
Dominica,North America
Antigua and Barbuda,North America
Saint Kitts and Nevis,North America
Puerto Rico,North America
Curacao,North America
Aruba,North America
Cayman Islands,North America
Argentina,South America
Bolivia,South America
Brazil,South America
Chile,South America
Colombia,South America
Ecuador,South America
Guyana,South America
Paraguay,South America
Peru,South America
Suriname,South America
Uruguay,South America
Venezuela,South America
French Guiana,South America
Falkland Islands,South America
Afghanistan,Asia
Armenia,Asia
Azerbaijan,Asia
Bahrain,Asia
Bangladesh,Asia
Bhutan,Asia
Brunei,Asia
Cambodia,Asia
China,Asia
Georgia,Asia
India,Asia
Indonesia,Asia
Iran,Asia
Iraq,Asia
Israel,Asia
Japan,Asia
Jordan,Asia
Kazakhstan,Asia
Kuwait,Asia
Kyrgyzstan,Asia
Laos,Asia
Lebanon,Asia
Malaysia,Asia
Maldives,Asia
Mongolia,Asia
Myanmar,Asia
Nepal,Asia
North Korea,Asia
Oman,Asia
Pakistan,Asia
Palestine,Asia
Philippines,Asia
Qatar,Asia
Saudi Arabia,Asia
Singapore,Asia
South Korea,Asia
Sri Lanka,Asia
Syria,Asia
Tajikistan,Asia
Thailand,Asia
Timor-Leste,Asia
Turkey,Asia
Turkmenistan,Asia
United Arab Emirates,Asia
Uzbekistan,Asia
Vietnam,Asia
Yemen,Asia
Al...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.