forked from mozmeao/snippets-service
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue mozmeao#997] Migrate TargetedLocales to Locale
- Loading branch information
1 parent
df49319
commit 82777da
Showing
14 changed files
with
191 additions
and
107 deletions.
There are no files selected for viewing
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,33 @@ | ||
# Generated by Django 2.2.1 on 2019-06-19 10:39 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import snippets.base.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('base', '0093_auto_20190618_1325'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Locale', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100)), | ||
('code', models.CharField(max_length=255, unique=True, validators=[django.core.validators.RegexValidator(regex='^,?([A-Za-z-]+,?)+$')])), | ||
('translations', models.TextField(blank=True, default='{}', help_text='JSON dictionary with Template fields as keys and localized strings as values.', validators=[snippets.base.validators.validate_json_data])), | ||
], | ||
options={ | ||
'ordering': ('name', 'code'), | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='asrsnippet', | ||
name='locale', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='base.Locale'), | ||
), | ||
] |
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
Oops, something went wrong.