-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implement new Square checkout flow #101
Conversation
This required updating all of the Python dependencies. Reportlab and Pillow have been unpinned.
@admin.display(description='Artist') | ||
def clickable_artist(self, obj): | ||
return format_html('<a href="{}">{}</a>', | ||
reverse('admin:artshow_artist_change', |
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.
what is reverse doing here?
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.
Reverse takes a reference to a route and generates a (relative) URL which will resolve to the route. In this example it will generate a URL which links to the admin page for editing the given artist. In this case I think Django now supports this particular case as a built-in feature: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display_links
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.
Never mind, that's not what list_display_links
does.
Replaces the inline credit card form with a system for creating real Square payment links, similar to the Paypal integration. The ability to specify an arbitrary payment amount has been removed. Payment completion is signaled via a webhook. For auditing purposes all valid webhook calls are logged.