mirror of
https://github.com/Findus23/acronomy.git
synced 2024-09-19 15:33:45 +02:00
14 lines
430 B
Python
14 lines
430 B
Python
from django.core.management.base import BaseCommand
|
|
|
|
from acros.models import Acronym
|
|
from acros.utils.conversion import md_to_html
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Updates all Markdown descriptions'
|
|
|
|
def handle(self, *args, **options):
|
|
acronyms = Acronym.objects.all()
|
|
for acronym in acronyms:
|
|
print(acronym.name)
|
|
acronym.description_html = md_to_html(acronym.description_md)
|