richie 3.1.3.dev27__py2.py3-none-any.whl → 3.1.3.dev30__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of richie might be problematic. Click here for more details.

@@ -70,6 +70,7 @@
70
70
  & .product-widget__header-main {
71
71
  display: flex;
72
72
  justify-content: center;
73
+ text-align: center;
73
74
  }
74
75
 
75
76
  & .product-widget__title {
@@ -399,6 +399,7 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
399
399
  .offer_prices {
400
400
  display: flex;
401
401
  flex-direction: column;
402
+ align-items: flex-end;
402
403
  }
403
404
 
404
405
  .offer__price {
@@ -451,6 +451,12 @@ class CourseRunFactory(factory.django.DjangoModelFactory):
451
451
  certificate_price = factory.Faker(
452
452
  "pydecimal", min_value=50, max_value=200, left_digits=5, right_digits=2
453
453
  )
454
+ discounted_price = factory.Faker(
455
+ "pydecimal", min_value=10, max_value=100, left_digits=5, right_digits=2
456
+ )
457
+ certificate_discounted_price = factory.Faker(
458
+ "pydecimal", min_value=10, max_value=40, left_digits=5, right_digits=2
459
+ )
454
460
 
455
461
  # pylint: disable=no-self-use
456
462
  @factory.lazy_attribute
@@ -185,8 +185,12 @@ class CoursesIndexer:
185
185
  "offer": {"type": "keyword"},
186
186
  "price": {"type": "keyword"},
187
187
  "price_currency": {"type": "keyword"},
188
+ "discounted_price": {"type": "keyword"},
189
+ "discount": {"type": "keyword"},
188
190
  "certificate_price": {"type": "keyword"},
189
191
  "certificate_offer": {"type": "keyword"},
192
+ "certificate_discounted_price": {"type": "keyword"},
193
+ "certificate_discount": {"type": "keyword"},
190
194
  },
191
195
  },
192
196
  # Keywords
@@ -475,7 +479,14 @@ class CoursesIndexer:
475
479
  params._source.course_runs[best_index]['certificate_price'],
476
480
  'offer': params._source.course_runs[best_index]['offer'],
477
481
  'price': params._source.course_runs[best_index]['price'],
478
- 'price_currency': params._source.course_runs[best_index]['price_currency']
482
+ 'price_currency': params._source.course_runs[best_index]['price_currency'],
483
+ 'discounted_price':
484
+ params._source.course_runs[best_index]['discounted_price'],
485
+ 'discount': params._source.course_runs[best_index]['discount'],
486
+ 'certificate_discounted_price':
487
+ params._source.course_runs[best_index]['certificate_discounted_price'],
488
+ 'certificate_discount':
489
+ params._source.course_runs[best_index]['certificate_discount']
479
490
  ];
480
491
  } else {
481
492
  return [
@@ -483,7 +494,11 @@ class CoursesIndexer:
483
494
  'certificate_price': null,
484
495
  'offer': null,
485
496
  'price': null,
486
- 'price_currency': null
497
+ 'price_currency': null,
498
+ 'discounted_price': null,
499
+ 'discount': null,
500
+ 'certificate_discounted_price': null,
501
+ 'certificate_discount': null
487
502
  ];
488
503
  }
489
504
  """,
@@ -639,8 +654,12 @@ class CoursesIndexer:
639
654
  "price",
640
655
  "price_currency",
641
656
  "offer",
657
+ "discounted_price",
658
+ "discount",
642
659
  "certificate_price",
643
660
  "certificate_offer",
661
+ "certificate_discounted_price",
662
+ "certificate_discount",
644
663
  )
645
664
  )
646
665
 
@@ -654,8 +673,12 @@ class CoursesIndexer:
654
673
  "price": cr["price"],
655
674
  "price_currency": cr["price_currency"],
656
675
  "offer": cr["offer"],
676
+ "discounted_price": cr["discounted_price"],
677
+ "discount": cr["discount"],
657
678
  "certificate_price": cr["certificate_price"],
658
679
  "certificate_offer": cr["certificate_offer"],
680
+ "certificate_discounted_price": cr["certificate_discounted_price"],
681
+ "certificate_discount": cr["certificate_discount"],
659
682
  }
660
683
  for cr in course_runs_queryset
661
684
  ]