diff --git a/api/templates/isbn.html b/api/templates/isbn.html new file mode 100644 index 00000000..65235e97 --- /dev/null +++ b/api/templates/isbn.html @@ -0,0 +1,56 @@ + + + + isbn + + + + +

You entered isbn: {{isbn}}

+ + + + {% if editions %} + + {% else %} +

No editions are available.

+ {% endif %} + + + + + diff --git a/core/management/commands/list_editions.py b/core/management/commands/list_editions.py new file mode 100644 index 00000000..f7ddb8f2 --- /dev/null +++ b/core/management/commands/list_editions.py @@ -0,0 +1,11 @@ +from django.core.management.base import BaseCommand + +from regluit.core import models + +class Command(BaseCommand): + help = "list all editions in the database" + + def handle(self, *args, **options): + editions = models.Edition.objects.all() + for edition in editions: + print edition.id, edition.title