1
0
Fork 0
mirror of https://github.com/Findus23/acronomy.git synced 2024-09-19 15:33:45 +02:00

add stub flag

This commit is contained in:
Lukas Winkler 2020-07-18 19:21:01 +02:00
parent 708f87a270
commit 4424919133
Signed by: lukas
GPG key ID: 54DE4D798D244853
2 changed files with 3 additions and 2 deletions

View file

@ -48,7 +48,7 @@ class EditForm(ModelForm):
class Meta:
model = Acronym
fields = ['name', 'full_name', "description_md", "tags"]
fields = ['name', 'full_name', "description_md", "stub", "tags"]
class AddForm(ModelForm):
@ -57,7 +57,7 @@ class AddForm(ModelForm):
class Meta:
model = Acronym
fields = ['name', 'full_name', "description_md", "tags"]
fields = ['name', 'full_name', "description_md", "stub", "tags"]
class WikipediaForm(ModelForm):

View file

@ -21,6 +21,7 @@ class Acronym(models.Model):
description_html = models.TextField(editable=False)
history = HistoricalRecords(excluded_fields=["created_date"])
tags = models.ManyToManyField(Tag, related_name="acronyms")
stub = models.BooleanField(default=True, help_text="check if this is a minimal entry that should be extended")
created_date = models.DateTimeField(auto_now_add=True)
modified_date = models.DateTimeField(auto_now=True)