Skip to content

Conversation

edwoodward
Copy link
Contributor

No description provided.

@edwoodward edwoodward self-assigned this May 10, 2022
@edwoodward edwoodward changed the title Added Content License snippet and drop down to select license of book Added Content License drop down to select license of book May 10, 2022
@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #1285 (f46a47a) into main (527eeb2) will increase coverage by 0.04%.
The diff coverage is 95.45%.

@@            Coverage Diff             @@
##             main    #1285      +/-   ##
==========================================
+ Coverage   86.57%   86.62%   +0.04%     
==========================================
  Files         490      495       +5     
  Lines        7777     7819      +42     
==========================================
+ Hits         6733     6773      +40     
- Misses       1044     1046       +2     

@edwoodward edwoodward requested a review from mwvolo May 10, 2022 21:52
@edwoodward edwoodward force-pushed the cc-licenses branch 2 times, most recently from d940e00 to 13c84d2 Compare May 11, 2022 14:31
license_name = models.CharField(
max_length=255, blank=True, null=True, editable=False, help_text="Name of the license.")
max_length=255, blank=True, null=True, choices=licenses,default=CC_BY_LICENSE_NAME, help_text="Name of the license.")
license_version = models.CharField(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do the other license fields not need similar choices?

if self.support_statement:
Book.objects.filter(locale=self.locale).update(support_statement=self.support_statement)

# populate license
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see what you are doing - might want to set the other license fields to uneditable then editable=False

from wagtail.tests.utils import WagtailPageTests
from wagtail.core.models import Page

import snippets.models
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import?

Copy link
Member

@mwvolo mwvolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with comments

@edwoodward edwoodward merged commit ab95750 into main May 11, 2022
@edwoodward edwoodward deleted the cc-licenses branch May 11, 2022 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants