view photologue/management/commands/plcreatesize.py @ 101:0a8942306b04

Bootstrap work for mailing list page. Also corrected form cleaning logic if fields aren't provided.
author Brian Neal <bgneal@gmail.com>
date Wed, 16 Oct 2013 20:32:58 -0500
parents e2868ad47a1e
children
line wrap: on
line source
from django.core.management.base import BaseCommand, CommandError
from photologue.management.commands import create_photosize

class Command(BaseCommand):  
    help = ('Creates a new Photologue photo size interactively.')
    requires_model_validation = True
    can_import_settings = True

    def handle(self, *args, **options):
        create_size(args[0])

def create_size(size):
    create_photosize(size)