diff --git a/semantics/management/commands/POL_role.py b/semantics/management/commands/POL_role.py new file mode 100644 index 0000000..1f075d0 --- /dev/null +++ b/semantics/management/commands/POL_role.py @@ -0,0 +1,31 @@ +#! /usr/bin/python +# -*- coding: utf-8 -*- + +from django.core.management.base import BaseCommand +from settings import PROJECT_PATH + +from semantics.models import SemanticRole, Complement, SemanticRolesDisplay + +#==========================================================# + +class Command(BaseCommand): + args = 'none' + help = '' + + def handle(self, **options): + POL_role() + +def POL_role(): + + role = SemanticRole(role='Lemma', color='256,256,256', gradient=None) + role.save() + + display = SemanticRolesDisplay(row=5, column=1, rowspan=1, colspan=4) + display.save() + display.roles.add(role) + display.save() + + + + +