promoted.PromotedGroup
Model Info
Key |
Value |
---|---|
Model Name |
PromotedGroup |
Verbose Name |
promoted group |
Verbose Name Plural |
promoted groups |
Docstring |
A promotion group defining the promotion rules for add-ons. |
Is Abstract |
False |
Is Proxy |
False |
Is Managed |
True |
Ordering |
[] |
Permissions |
[] |
Default Permissions |
(‘add’, ‘change’, ‘delete’, ‘view’) |
Indexes |
[] |
Constraints |
[] |
Database Table |
promoted_promotedgroup |
Base Manager |
None |
Default Manager |
None |
File |
/data/olympia/src/olympia/promoted/models.py |
Starting Line Number |
49 |
Method Resolution Order |
(<class ‘olympia.promoted.models.PromotedGroup’>, <class ‘django.db.models.base.Model’>, <class ‘django.db.models.utils.AltersData’>, <class ‘object’>) |
Fields
Field Name |
Field Type |
Database Column |
Database Type |
Verbose Name |
---|---|---|---|---|
|
BooleanField |
active |
bool |
active |
|
BooleanField |
admin_review |
bool |
admin review |
|
CharField |
api_name |
varchar(100) |
api name |
|
JSONField |
autograph_signing_states |
json |
autograph signing states |
|
BooleanField |
badged |
bool |
badged |
|
BooleanField |
can_be_compatible_with_all_fenix_versions |
bool |
can be compatible with all fenix versions |
|
BooleanField |
can_primary_hero |
bool |
can primary hero |
|
BooleanField |
flag_for_human_review |
bool |
flag for human review |
|
SmallIntegerField |
group_id |
smallint |
group id |
|
BooleanField |
high_profile |
bool |
high profile |
|
BooleanField |
high_profile_rating |
bool |
high profile rating |
|
AutoField |
id |
integer AUTO_INCREMENT |
ID |
|
BooleanField |
immediate_approval |
bool |
immediate approval |
|
BooleanField |
is_public |
bool |
is public |
|
BooleanField |
listed_pre_review |
bool |
listed pre review |
|
CharField |
name |
varchar(255) |
name |
|
ManyToOneRel |
integer |
||
|
ManyToOneRel |
integer |
||
|
FloatField |
search_ranking_bump |
double precision |
search ranking bump |
|
BooleanField |
unlisted_pre_review |
bool |
unlisted pre review |
fields_reverse_relation=[FieldReverseRelation(name=’promotedgroup_set’, field_type=’ManyToOneRel’, field_db_type=’integer’, related_model=’promoted.PromotedAddon’, field_name_on_related_model=’promoted_group’, field_type_on_related_model=’ForeignKey’), FieldReverseRelation(name=’promoted_versions’, field_type=’ManyToOneRel’, field_db_type=’integer’, related_model=’promoted.PromotedApproval’, field_name_on_related_model=’promoted_group’, field_type_on_related_model=’ForeignKey’)]
Reverse Relations
Field Name |
Field Type |
Database Type |
Related Model |
Field Name on Related Model |
Field Type on Related Model |
---|---|---|---|---|---|
|
ManyToOneRel |
integer |
promoted.PromotedApproval |
promoted_group |
ForeignKey |
|
ManyToOneRel |
integer |
promoted.PromotedAddon |
promoted_group |
ForeignKey |
Methods
Other Methods
Method Name |
Signature |
---|---|
|
|
|
|
|
|
Private Methods
Method Name |
Signature |
---|---|
|
|
Custom Managers
default
Class: PromotedGroupManager
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they’ll be attached through a transform function.*
Custom Methods
all_for(self, addon)
approved_for(self, addon)
transform(self, fn)
Custom QuerySet
Class: PromotedGroupQuerySet
Represent a lazy database lookup for a set of objects.
Custom Methods
no_transforms(self)
only_translations(self)
Remove all transforms except translations.
optimized_count(self)
*Slightly optimized count() for cases where there is a DISTINCT in the queryset.
When a count() call is made on a queryset that has a distinct, that causes django to run the full SELECT (including all fields, distinct, ordering etc) in a subquery and then COUNT() on the result of that subquery, which is costly/innefficient. That’s tracked in https://code.djangoproject.com/ticket/30685. We can’t easily fix the fact that there is a subquery, but we can avoid selecting all fields and ordering in that subquery needlessly.*
pop_transforms(self)
transform(self, fn)
objects
Class: PromotedGroupManager
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they’ll be attached through a transform function.*
Custom Methods
all_for(self, addon)
approved_for(self, addon)
transform(self, fn)
Custom QuerySet
Class: PromotedGroupQuerySet
Represent a lazy database lookup for a set of objects.
Custom Methods
no_transforms(self)
only_translations(self)
Remove all transforms except translations.
optimized_count(self)
*Slightly optimized count() for cases where there is a DISTINCT in the queryset.
When a count() call is made on a queryset that has a distinct, that causes django to run the full SELECT (including all fields, distinct, ordering etc) in a subquery and then COUNT() on the result of that subquery, which is costly/innefficient. That’s tracked in https://code.djangoproject.com/ticket/30685. We can’t easily fix the fact that there is a subquery, but we can avoid selecting all fields and ordering in that subquery needlessly.*
pop_transforms(self)
transform(self, fn)
!!! THIS DOCUMENT WAS AUTOGENERATED ON 2025-07-11 !!!