diff --git a/storage/admin.py b/storage/admin.py index 55aa82a..0059145 100644 --- a/storage/admin.py +++ b/storage/admin.py @@ -18,6 +18,7 @@ class ModelAdminMixin(object): class ItemForm(forms.ModelForm): name = forms.CharField(widget=forms.TextInput()) + wiki_link = forms.CharField(widget=forms.TextInput()) class Meta: model = Item diff --git a/storage/migrations/0012_item_wiki_link.py b/storage/migrations/0012_item_wiki_link.py new file mode 100644 index 0000000..8d5e17c --- /dev/null +++ b/storage/migrations/0012_item_wiki_link.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.20 on 2023-12-03 18:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("storage", "0011_auto_20230720_1240"), + ] + + operations = [ + migrations.AddField( + model_name="item", + name="wiki_link", + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/storage/models.py b/storage/models.py index 31f7ce4..d2b20c3 100644 --- a/storage/models.py +++ b/storage/models.py @@ -71,6 +71,7 @@ class Item(models.Model, TreeModelMixin): name = models.TextField() + wiki_link = models.TextField() description = models.TextField(blank=True, null=True) state = models.CharField(max_length=31, choices=STATES, default=STATES[0][0]) categories = models.ManyToManyField(Category, blank=True) diff --git a/storage/templates/item.html b/storage/templates/item.html index 710ceb6..5fcc2e4 100644 --- a/storage/templates/item.html +++ b/storage/templates/item.html @@ -10,8 +10,18 @@