-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bg-product-pages-share
- Loading branch information
Showing
14 changed files
with
148 additions
and
27 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
network-api/networkapi/buyersguide/migrations/0008_product_slug.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.16 on 2018-10-18 20:46 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('buyersguide', '0007_auto_20181012_2045'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='product', | ||
name='slug', | ||
field=models.CharField(blank=True, default=None, editable=False, help_text='slug used in urls', max_length=256, null=True), | ||
), | ||
] |
29 changes: 29 additions & 0 deletions
29
network-api/networkapi/buyersguide/migrations/0009_auto_20181018_2047.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.16 on 2018-10-18 20:47 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
from django.utils.text import slugify | ||
|
||
|
||
def generate_slugs(apps, schema_editor): | ||
Product = apps.get_model('buyersguide', 'Product') | ||
for product in Product.objects.all(): | ||
product.slug = slugify(product.name) | ||
product.save() | ||
|
||
|
||
def remove_slug(): | ||
# It's safe for these to just get deleted | ||
pass | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('buyersguide', '0008_product_slug'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(generate_slugs, remove_slug) | ||
] |
20 changes: 20 additions & 0 deletions
20
network-api/networkapi/buyersguide/migrations/0010_auto_20181018_2053.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.16 on 2018-10-18 20:53 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('buyersguide', '0009_auto_20181018_2047'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='product', | ||
name='slug', | ||
field=models.CharField(blank=True, default=None, editable=False, help_text='slug used in urls', max_length=256), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const CREEPINESS_LABELS = [ | ||
`Not creepy`, | ||
`A little creepy`, | ||
`Somewhat creepy`, | ||
`Very creepy`, | ||
`Super creepy` | ||
]; | ||
|
||
export default CREEPINESS_LABELS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters