-
Notifications
You must be signed in to change notification settings - Fork 1
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
Recommend Us views and urls #81
Conversation
fb80337
to
d22b7fe
Compare
Thanks for this @joemull - looks great! It would be good to get access to the test version asap so I can go through and start editing the copy accordingly, if you could let me know when this becomes possible? Thanks again - amazing work |
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.
This works really well.
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.
nice one @joemull !
I've added a few suggestions inline
views.py
Outdated
|
||
logger = get_logger(__name__) | ||
|
||
|
||
def hourglass(template): |
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.
can we use a name that better describes the behaviour of this function? we probably want to reserve the name hourglass
for an eventual module, rather than for a utility function here
Personally, I would avoid coupling this bit of code with the "hourglass" theme and instead handle the missing template in a more generic fashion, thought I believe it would be too little too short at this point.
}, | ||
{ | ||
"group": { | ||
"name": "plugin:consortial_billing" |
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 understand why you'd want to use the plugin naming scheme for the group, but bear in mind these will not be seen as email templates elsewhere in Janeway (e.g. email template manager). setting the group as "email"
is the only way to achieve that at the moment.
If you wanted this behaviour, every email setting will also need a "email_subject"
group member as a counterpart.
views.py
Outdated
submission_models.Article, | ||
pk=article_pk, |
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.
should use the PublishedArticles
manager, as you've done previously
views.py
Outdated
'journal': get_object_or_404( | ||
Journal, | ||
pk=journal_pk, | ||
) |
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 think we also want the filter you used previously:
journal__in=request.press.public_journals,
Requires openlibhums/hourglass#403.
Closes #74.
Notes:
/plugins/supporters/recommend-us/
.