-
Notifications
You must be signed in to change notification settings - Fork 597
add people page with basic details #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
thibaudcolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback so far - I have yet to test the API, will give that a go and report back
| help_text="Select the social media platform", | ||
| ) | ||
| url = URLBlock( | ||
| help_text="Full URL to your profile (e.g., https://github.com/username)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would expect a verbose_name so the acronym is correct when displayed ("URL")
| {% if page.origin %} | ||
| <p class="bread-detail__meta-title">Origin</p> | ||
| <p class="bread-detail__meta-content">{{ page.origin }}</p> | ||
| {% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the "Origin" terminology a bit unexpected when it comes to people. Should we not use something more broadly used like "Location"?
| <p class="bread-detail__meta-title">Socials</p> | ||
| <div class="social-links"> | ||
| {% for block in page.social_links %} | ||
| <a href="{{ block.value.url }}" target="_blank" rel="noopener noreferrer" title="{{ block.value.platform }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value.platform is the internal identifier, I think we want to use the corresponding human-readable label instead.
| blank=True, | ||
| on_delete=models.SET_NULL, | ||
| related_name="+", | ||
| help_text="Landscape mode only; horizontal width between 1000px and 3000px.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting help_text is appropriate per current template but we do intend to change it soon
| help_text="Landscape mode only; horizontal width between 1000px and 3000px.", | ||
| ) | ||
| body = StreamField( | ||
| BaseStreamBlock(), verbose_name="Page body", blank=True, use_json_field=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go without use_json_field
| BaseStreamBlock(), verbose_name="Page body", blank=True, use_json_field=True | ||
| ) | ||
|
|
||
| origin = models.ForeignKey( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting this is a confusing term in the context of people, though it definitely makes sense to reuse Country. Maybe change the field label here at least?
| ] | ||
|
|
||
| search_fields = Page.search_fields + [ | ||
| index.SearchField("body"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Search based on introduction and origin/country, in addition
This pr adds people section with basic details to the website
used the existing breads page as base template, created people model with minimal details