Skip to content
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

Add configuration settings for IPNs #26

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

cdwilson
Copy link
Contributor

@eeintech curious to get your thoughts on this.

Currently, Ki-nTree only supports "semi-intelligent" IPNs of the form {category_id}-{unique_id}-{variant_id}.

This PR does four things:

  1. It makes the unique ID length configurable via settings.IPN_UNIQUE_ID_LENGTH
  2. It makes the variant suffix ID configurable via settings.IPN_VARIANT_SUFFIX
  3. It makes the variant suffix optional via settings.IPN_USE_VARIANT_SUFFIX
  4. It adds the ability to use a "non-intelligent" IPN scheme with an optional fixed prefix via settings.IPN_USE_FIXED_PREFIX. If IPN_USE_FIXED_PREFIX == '' (default), no prefix is added to the IPN.

This allows IPNs like the following:

  • 000123
  • 123
  • PREFIX-00123
  • FOO-12345-A
  • 000123-01

@eeintech
Copy link
Contributor

@cdwilson Looks like a great addition! I'm going to play with it later this week 😉

@eeintech eeintech merged commit c92c7da into sparkmicro:master Mar 23, 2021
@eeintech eeintech mentioned this pull request Apr 7, 2021
@cdwilson cdwilson deleted the cdwilson/configurable-ipns branch April 15, 2021 04:49
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