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

Pricing in server #782

Merged

Conversation

davidfischer
Copy link
Collaborator

Note: This is branched from the Django 4 upgrade: #781.

Allow advertisers to select regions and topics when requesting a flight. Based on what they specify, an estimated CPM will be shown. Prices per region/topic will be stored in a JSON field on the region model. Regions and topics will have an option whether they can be selected by advertisers when requesting a new flight.

  • Currently when selecting multiple regions and topics, an average is taken. So if there's 2 regions selected and 2 topics selected, the price will be an average of the 4 combinations. This seems a bit awkward.
  • Discounts are currently hard coded

Screenshot

Screenshot from 2023-08-23 16-55-45

@davidfischer davidfischer requested a review from a team as a code owner August 23, 2023 23:59
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited for this 🎉

self.message = message

def __call__(self, value):
from .models import Topic # noqa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing there's a reason this is a nested import, but probably good to note it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validators are used to validate the models. It would be circular without this. I'll note it.

assets/src/views/flight-request.js Outdated Show resolved Hide resolved
@davidfischer davidfischer merged commit ee3aa19 into davidfischer/django-42-upgrade Oct 3, 2023
1 check passed
@davidfischer davidfischer deleted the davidfischer/pricing-in-server branch October 3, 2023 20:15
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