Skip to content
Snippets Groups Projects
Unverified Commit 5ad2ffc5 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add management command for import.

parent 3742891b
No related branches found
No related tags found
No related merge requests found
from django.core.management.base import BaseCommand
from django.utils.translation import gettext as _
from ...util import untis_import_xml
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('untis_xml_path', help=_(
'Path to Untis XML export file'))
def handle(self, *args, **options):
untis_xml = open(options['untis_xml_path'], 'rb')
untis_import_xml(None, untis_xml)
from datetime import date, time
from xml.dom import minidom
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from biscuit.apps.cambro.models import Room
from biscuit.apps.chronos.models import Subject, TimePeriod, Lesson
from biscuit.core.models import Group, Person
from biscuit.core.util import messages
def get_child_node_text(node, tag):
......
......@@ -9,7 +9,8 @@ setup(
author="Teckids e.V.",
author_email="verein@teckids.org",
packages=[
'biscuit.apps.untis'
'biscuit.apps.untis',
'biscuit.apps.untis.management.commands'
],
namespace_packages=[
'biscuit',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment