diff --git a/home/models/pages.py b/home/models/pages.py index f87553e..e3be9c6 100644 --- a/home/models/pages.py +++ b/home/models/pages.py @@ -66,6 +66,11 @@ class CoursePage(Page): help_text="Additional groups that should have access to this course, e.g. Editors. NOTE: Users who purchase the course will be automatically added to a dedicated access group for this course, so you don't need to add that group here.", ) + repository_url = models.URLField( + null=True, + blank=True, + ) + def _user_has_access(self, user): if not user.is_authenticated: return False @@ -124,6 +129,11 @@ class CoursePage(Page): FieldPanel("description"), FieldPanel("body"), FieldPanel("allowed_groups", widget=CheckboxSelectMultiple), + FieldPanel( + "repository_url", + read_only=True, + heading="Repository URL (auto-generated)", + ), ] parent_page_types = ["home.CourseIndexPage"] subpage_types = ["home.CourseModulePage"]