ore.management.commands.tikzdump   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A Command.handle() 0 6 1
1
from django.core.management.base import BaseCommand
2
from ore.models import Graph
3
4
5
class Command(BaseCommand):
6
    args = '<graph_id>'
7
    help = 'Dumps the graph with the given ID into TIKZ'
8
9
    def handle(self, *args, **options):
10
        graph_id = int(args[0])
11
        graph = Graph.objects.get(pk=graph_id)
12
13
        print('Dumping graph %d' % (graph_id))
14
        print graph.to_tikz()
15