Closed Bug 917031 Opened 12 years ago Closed 12 years ago

Create model for content control (geographic restrictions)

Categories

(Marketplace Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-11-05

People

(Reporter: cvan, Assigned: cvan)

References

Details

(Whiteboard: [qa+])

I'm thinking of forgoing AddonExcludedRegion and instead opting for a simple 1-to-1 relationship: a single row that gives us the visibility for every carrier and region. https://github.com/mozilla/zamboni/blob/master/mkt/webapps/models.py#L1391 I was thinking of a simple model like this: class ContentControl(amo.models.ModelBase): app = models.OneToOneField(Webapp) use_strict = models.BooleanField() region_br = models.BooleanField() region_co = models.BooleanField() region_de = models.BooleanField() region_es = models.BooleanField() region_gr = models.BooleanField() region_hu = models.BooleanField() region_me = models.BooleanField() region_mx = models.BooleanField() region_pl = models.BooleanField() region_rs = models.BooleanField() region_uk = models.BooleanField() region_us = models.BooleanField() region_ve = models.BooleanField() region_worldwide = models.BooleanField() carrier_america_movil = models.BooleanField() carrier_china_unicom = models.BooleanField() carrier_deutsche_telekom = models.BooleanField() carrier_etisalat = models.BooleanField() carrier_hutchinson_three_group = models.BooleanField() carrier_kddi = models.BooleanField() carrier_kt = models.BooleanField() carrier_megafon = models.BooleanField() carrier_qtel = models.BooleanField() carrier_singtel = models.BooleanField() carrier_smart = models.BooleanField() carrier_sprint = models.BooleanField() carrier_telecom_italia_group = models.BooleanField() carrier_telefonica = models.BooleanField() carrier_telenor = models.BooleanField() carrier_tmn = models.BooleanField() carrier_vimpelcom = models.BooleanField() Notice I've included the carriers in this model. If/when we want to start restricting carriers, that'll be supported just fine. If/when we have to start restricting carrier+region combinations, that'll complicate everything and we'll probably need to rethink everything. We could even move the `enable_new_regions column` from the `addons` model to here.
Component: Consumer Pages → General
Assignee: nobody → cvan
Priority: -- → P2
Target Milestone: --- → 2013-10-01
Target Milestone: 2013-10-01 → 2013-10-14
https://github.com/mozilla/zamboni/commit/8494c03 * Enforces `restricted` restriction for paid apps * Enforces no regional restriction for existing free apps (as the default) * Determines popular regional content for free and paid apps * Removes all AddonExcludedRegion objects for free apps Running this command does the above: python manage.py migrate_geodata.py --settings=settings_local_mkt This affects the UI for Free and Paid region selection.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [qa+]
Target Milestone: 2013-10-14 → 2013-11-05
In order to be sure that we will test correctly, please add STR. Thank you!
Flags: needinfo?(cvan)
(In reply to Iulian Timis from comment #2) > In order to be sure that we will test correctly, please add STR. Thank you! The things to check for were itemized in comment 1. Please make sure that region exclusions work as normal for FREE apps when "Choose where my app is made available" is selected and PAID apps always. Please also make sure that apps show up in every region for FREE apps when "Make my app available everywhere" is selected. Thanks!
Flags: needinfo?(cvan)
Verified as fixed in https://marketplace-dev.allizom.org/developers/ Compatibility & Payments on FF28 (Win 7). The region exclusions are working properly for both Free and PAID apps. Closing bug.
Status: RESOLVED → VERIFIED
This bug has a few missing pieces. Keeping it open until then.
Status: VERIFIED → RESOLVED
Closed: 12 years ago12 years ago
(In reply to krupa raj[:krupa] from comment #5) > This bug has a few missing pieces. Keeping it open until then. Can you expand on that or mark bugs dependent?
You need to log in before you can comment on or make changes to this bug.