abuse.AbuseReport
Model Info
Key |
Value |
---|---|
Model Name |
AbuseReport |
Verbose Name |
abuse report |
Verbose Name Plural |
abuse reports |
Docstring |
AbuseReport(id, created, modified, reporter, reporter_email, reporter_name, country_code, guid, user, rating, collection, message, client_id, addon_name, addon_summary, addon_version, addon_signature, application, application_version, application_locale, operating_system, operating_system_version, install_date, reason, addon_install_origin, addon_install_method, addon_install_source, addon_install_source_url, report_entry_point, location, cinder_job, illegal_category, illegal_subcategory) |
Is Abstract |
False |
Is Proxy |
False |
Is Managed |
True |
Ordering |
[] |
Permissions |
[] |
Default Permissions |
(‘add’, ‘change’, ‘delete’, ‘view’) |
Indexes |
[<Index: fields=[‘created’] name=’abuse_reports_created_idx’>, <Index: fields=[‘guid’] name=’guid_idx’>] |
Constraints |
[<CheckConstraint: check=(OR: (AND: (NOT (AND: (‘guid’, ‘’))), (‘collection__isnull’, True), (‘guid__isnull’, False), (‘rating__isnull’, True), (‘user__isnull’, True)), (AND: (‘collection__isnull’, True), (‘guid__isnull’, True), (‘rating__isnull’, True), (‘user__isnull’, False)), (AND: (‘collection__isnull’, True), (‘guid__isnull’, True), (‘rating__isnull’, False), (‘user__isnull’, True)), (AND: (‘collection__isnull’, False), (‘guid__isnull’, True), (‘rating__isnull’, True), (‘user__isnull’, True))) name=’just_one_of_guid_user_rating_collection_must_be_set’>] |
Database Table |
abuse_reports |
Base Manager |
None |
Default Manager |
None |
File |
/data/olympia/src/olympia/abuse/models.py |
Starting Line Number |
460 |
Method Resolution Order |
(<class ‘olympia.abuse.models.AbuseReport’>, <class ‘olympia.amo.models.ModelBase’>, <class ‘olympia.amo.models.SaveUpdateMixin’>, <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 |
---|---|---|---|---|
|
PositiveSmallIntegerField |
addon_install_method |
smallint UNSIGNED |
addon install method |
|
CharField |
addon_install_origin |
varchar(255) |
addon install origin |
|
PositiveSmallIntegerField |
addon_install_source |
smallint UNSIGNED |
addon install source |
|
CharField |
addon_install_source_url |
varchar(255) |
addon install source url |
|
CharField |
addon_name |
varchar(255) |
addon name |
|
PositiveSmallIntegerField |
addon_signature |
smallint UNSIGNED |
addon signature |
|
CharField |
addon_summary |
varchar(255) |
addon summary |
|
CharField |
addon_version |
varchar(255) |
addon version |
|
PositiveSmallIntegerField |
application |
smallint UNSIGNED |
application |
|
CharField |
application_locale |
varchar(255) |
application locale |
|
CharField |
application_version |
varchar(255) |
application version |
|
ForeignKey |
cinder_job_id |
integer |
cinder job |
|
OneToOneRel |
integer |
||
|
CharField |
client_id |
varchar(64) |
client id |
|
ForeignKey |
collection_id |
integer UNSIGNED |
collection |
|
CharField |
country_code |
varchar(2) |
country code |
|
DateTimeField |
created |
datetime(6) |
created |
|
CharField |
guid |
varchar(255) |
guid |
|
AutoField |
id |
integer AUTO_INCREMENT |
ID |
|
PositiveSmallIntegerField |
illegal_category |
smallint UNSIGNED |
illegal category |
|
PositiveSmallIntegerField |
illegal_subcategory |
smallint UNSIGNED |
illegal subcategory |
|
DateTimeField |
install_date |
datetime(6) |
install date |
|
PositiveSmallIntegerField |
location |
smallint UNSIGNED |
location |
|
TextField |
message |
longtext |
message |
|
DateTimeField |
modified |
datetime(6) |
modified |
|
CharField |
operating_system |
varchar(255) |
operating system |
|
CharField |
operating_system_version |
varchar(255) |
operating system version |
|
ForeignKey |
rating_id |
integer UNSIGNED |
rating |
|
PositiveSmallIntegerField |
reason |
smallint UNSIGNED |
reason |
|
PositiveSmallIntegerField |
report_entry_point |
smallint UNSIGNED |
report entry point |
|
ForeignKey |
reporter_id |
integer |
reporter |
|
CharField |
reporter_email |
varchar(255) |
reporter email |
|
CharField |
reporter_name |
varchar(255) |
reporter name |
|
ForeignKey |
user_id |
integer |
user |
Relations
Field Name |
Field Type |
Database Column |
Database Type |
Related Model |
Related Name |
---|---|---|---|---|---|
|
ForeignKey |
cinder_job_id |
integer |
abuse.CinderJob |
abusereport_set |
|
ForeignKey |
collection_id |
integer UNSIGNED |
bandwagon.Collection |
abuse_reports |
|
ForeignKey |
rating_id |
integer UNSIGNED |
ratings.Rating |
abuse_reports |
|
ForeignKey |
reporter_id |
integer |
users.UserProfile |
abuse_reported |
|
ForeignKey |
user_id |
integer |
users.UserProfile |
abuse_reports |
fields_reverse_relation=[FieldReverseRelation(name=’abusereport_set’, field_type=’OneToOneRel’, field_db_type=’integer’, related_model=’abuse.CinderAppeal’, field_name_on_related_model=’reporter_report’, field_type_on_related_model=’OneToOneField’)]
Reverse Relations
Field Name |
Field Type |
Database Type |
Related Model |
Field Name on Related Model |
Field Type on Related Model |
---|---|---|---|---|---|
|
OneToOneRel |
integer |
abuse.CinderAppeal |
reporter_report |
OneToOneField |
Methods
Other Methods
Method Name |
Signature |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Methods
Method Name |
Signature |
---|---|
|
|
Custom Managers
default
Class: AbuseReportManager
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they’ll be attached through a transform function.*
Custom Methods
for_addon(self, addon)
transform(self, fn)
Custom QuerySet
Class: AbuseReportQuerySet
Represent a lazy database lookup for a set of objects.
Custom Methods
for_addon(self, addon)
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: AbuseReportManager
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they’ll be attached through a transform function.*
Custom Methods
for_addon(self, addon)
transform(self, fn)
Custom QuerySet
Class: AbuseReportQuerySet
Represent a lazy database lookup for a set of objects.
Custom Methods
for_addon(self, addon)
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 !!!