-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #372 from open5e/v2_item_category
V2 item category
- Loading branch information
Showing
16 changed files
with
340 additions
and
31 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
18 changes: 18 additions & 0 deletions
18
api_v2/migrations/0023_rename_category_item_category_text.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,18 @@ | ||
# Generated by Django 3.2.20 on 2023-11-04 23:57 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0022_condition'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='item', | ||
old_name='category', | ||
new_name='category_text', | ||
), | ||
] |
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,23 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0023_rename_category_item_category_text'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ItemCategory', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(help_text='Name of the item.', max_length=100)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |
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,23 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:09 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0024_itemcategory'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='itemcategory', | ||
name='id', | ||
), | ||
migrations.AddField( | ||
model_name='itemcategory', | ||
name='key', | ||
field=models.CharField(default='key', help_text='Unique key for the ItemCategory.', max_length=100, primary_key=True, serialize=False), | ||
preserve_default=False, | ||
), | ||
] |
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,25 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0025_auto_20231105_0009'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='itemcategory', | ||
name='document', | ||
field=models.ForeignKey(default='srd', on_delete=django.db.models.deletion.CASCADE, to='api_v2.document'), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='itemcategory', | ||
name='key', | ||
field=models.CharField(help_text='Unique key for the Item.', max_length=100, primary_key=True, serialize=False), | ||
), | ||
] |
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,19 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:24 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0026_auto_20231105_0015'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='item', | ||
name='category', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='api_v2.itemcategory'), | ||
), | ||
] |
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,18 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:28 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0027_item_category'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='item', | ||
name='category_text', | ||
field=models.CharField(choices=[('staff', 'Staff'), ('rod', 'Rod'), ('scroll', 'Scroll'), ('potion', 'Potion'), ('wand', 'Wand'), ('wondrous-item', 'Wondrous item'), ('ring', 'Ring'), ('ammunition', 'Ammunition'), ('weapon', 'Weapon'), ('armor', 'Armor'), ('gem', 'Gem'), ('jewelry', 'Jewelry'), ('art', 'Art'), ('trade-good', 'Trade Good'), ('shield', 'Shield'), ('poison', 'Poison'), ('adventuring-gear', 'Adventuring gear'), ('tools', 'Tools')], help_text='The category of the magic item.', max_length=100, null=True), | ||
), | ||
] |
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,24 @@ | ||
# Generated by Django 3.2.20 on 2023-11-05 00:34 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api_v2', '0028_alter_item_category_text'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='item', | ||
name='category_text', | ||
), | ||
migrations.AlterField( | ||
model_name='item', | ||
name='category', | ||
field=models.ForeignKey(default='pooop', on_delete=django.db.models.deletion.CASCADE, to='api_v2.itemcategory'), | ||
preserve_default=False, | ||
), | ||
] |
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
Oops, something went wrong.