Skip to content

Instantly share code, notes, and snippets.

@VizualAbstract
Last active April 8, 2019 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VizualAbstract/cf4c3c4ce5efc99a70a01fdf91cd68c2 to your computer and use it in GitHub Desktop.
Save VizualAbstract/cf4c3c4ce5efc99a70a01fdf91cd68c2 to your computer and use it in GitHub Desktop.
Developer resources

Developer resources

From fixing bugs to refactoring pages or even building brand new features, the developer resources outlined below will be helpful for anyone looking to work with the ReCharge codebase.


Architectural overview

The ReCharge application is made up of many different products and features. While it may take a long time to learn the intricacies of each one, here is a brief overview on the components most commonly used in their development.

For a detailed outline, referr to Mike's files at the end of this document.

Views

Location: customcheckout/views/

Views contain Python functions focused on receiving web request, which then return a web response. Typically, these responses will render a template, but sometimes a JSON object is returned, or redirect is performed depending on needs. Learn more.

We have over 50 different views, below is a highlight of several key ones that are commonly misunderstood or the cause of confusion.

  • add_ons.py: List of integrations, originally named when we still called them Addons. Not to be confused with "Widget Integrations"
  • customer.py: Customer related views, sometimes mistaken for the Customer Portal pages, although it does contain references to some
  • checkout_responsive.py: Our custom checkout views, not to be confused with the namesake of our repository
  • purchase.py: Originally called 'address', the Purchase view is a set of pages that interact with the purchase_model
  • recharge_customer.py: Views related to the ReCharge customer, the stores who subscribe to our service and not their customers
  • subscriptions.py: A series of pages that handle purchase items, or subscription items, including editing, viewing, adding new, and cancellation

Mike has provided a complete reference, available here: views.txt

Note: This overview does not cover the use of views located elsewhere, such as in projects using Blueprints.

Services

Location: customcheckout/services/

Note: This overview does not cover the use of views located elsewhere, such as in projects using Blueprints.

Mike has provided a complete reference, available here: services.txt

RQ Jobs

Location: customcheckout/rqjobs/

API

Location: customcheckout/api/


Docker Compose + Store Importer


Mike's files

Raw resources and references originally written and detailed by Mike, the ReCharge Payments CTO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment