Commit 6b16d0dc66fb51917a8427d50d36c02b2fe31575
1 parent
d3dcde9b
Dodano rolę dla frazeologizmów
Showing
1 changed file
with
31 additions
and
0 deletions
semantics/management/commands/POL_role.py
0 → 100644
1 | +#! /usr/bin/python | |
2 | +# -*- coding: utf-8 -*- | |
3 | + | |
4 | +from django.core.management.base import BaseCommand | |
5 | +from settings import PROJECT_PATH | |
6 | + | |
7 | +from semantics.models import SemanticRole, Complement, SemanticRolesDisplay | |
8 | + | |
9 | +#==========================================================# | |
10 | + | |
11 | +class Command(BaseCommand): | |
12 | + args = 'none' | |
13 | + help = '' | |
14 | + | |
15 | + def handle(self, **options): | |
16 | + POL_role() | |
17 | + | |
18 | +def POL_role(): | |
19 | + | |
20 | + role = SemanticRole(role='Lemma', color='256,256,256', gradient=None) | |
21 | + role.save() | |
22 | + | |
23 | + display = SemanticRolesDisplay(row=5, column=1, rowspan=1, colspan=4) | |
24 | + display.save() | |
25 | + display.roles.add(role) | |
26 | + display.save() | |
27 | + | |
28 | + | |
29 | + | |
30 | + | |
31 | + | |
... | ... |