esentity 0.2.292__tar.gz → 0.2.294__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: esentity
3
- Version: 0.2.292
3
+ Version: 0.2.294
4
4
  Summary: Elasticsearch Entity Tools
5
5
  Home-page: https://slotmarks.com
6
6
  Author: Slotmarks
@@ -0,0 +1 @@
1
+ __version__ = '0.2.294'
@@ -519,19 +519,27 @@ class TopSlotsExtension(Extension):
519
519
  def _render(self, args, caller=None):
520
520
  logger.info('Top Slots IN Args: {0}'.format(args))
521
521
 
522
- default = ['NetEnt', 8, 4, False, True]
523
- args = args[:4] + default[len(args):] + args[4:]
522
+ default = [[], 8, 4, False, True, [{'rating': {'order': 'desc'}}], 'slots_list']
523
+ args = args[:6] + default[len(args):] + args[6:]
524
524
 
525
525
  logger.info('Top Slots OUT Args: {0}'.format(args))
526
526
 
527
- provider = args[0]
527
+ providers = args[0]
528
528
  count = int(args[1])
529
529
  in_row = int(args[2])
530
530
  random = bool(args[3])
531
531
  show_provider = bool(args[4])
532
+ sorting = args[5]
533
+ template = args[6]
532
534
 
533
- # args: service
534
- slots, found = Page.get(
535
+ kwargs = {
536
+ 'category': 'slot',
537
+ '_sort': sorting
538
+ }
539
+ if providers:
540
+ kwargs['software'] = providers
541
+
542
+ slots, _ = Page.get(
535
543
  is_active=True,
536
544
  is_searchable=True,
537
545
  is_redirect=False,
@@ -539,11 +547,10 @@ class TopSlotsExtension(Extension):
539
547
  _source=True,
540
548
  _count=count,
541
549
  _random=random,
542
- category='slot',
543
- software=provider,
550
+ **kwargs
544
551
  )
545
552
 
546
- t = current_app.jinja_env.get_template('_ext-slots_list.html')
553
+ t = current_app.jinja_env.get_template(f'_ext-{template}.html')
547
554
  s = t.render(
548
555
  slots=slots,
549
556
  in_row=in_row,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "esentity"
3
- version = "0.2.292"
3
+ version = "0.2.294"
4
4
  description = "Elasticsearch Entity Tools"
5
5
  authors = ["Slotmarks <info@slotmarks.com>"]
6
6
  homepage = "https://slotmarks.com"
@@ -9,7 +9,7 @@ package_data = \
9
9
 
10
10
  setup_kwargs = {
11
11
  'name': 'esentity',
12
- 'version': '0.2.292',
12
+ 'version': '0.2.294',
13
13
  'description': 'Elasticsearch Entity Tools',
14
14
  'long_description': None,
15
15
  'author': 'Slotmarks',
@@ -1 +0,0 @@
1
- __version__ = '0.2.292'
File without changes
File without changes