Skip to content

Instantly share code, notes, and snippets.

@jedie
Created June 21, 2011 10:47
Show Gist options
  • Save jedie/1037609 to your computer and use it in GitHub Desktop.
Save jedie/1037609 to your computer and use it in GitHub Desktop.
# coding: utf-8
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.core import management
import reversion # django-reversion
from pyrm.models.rechnung import Rechnung
from pyrm.utils.csv_utils import get_dictlist
class Command(BaseCommand):
help = 'Import Conbank Buchungen.'
args = "/path/to/Umsaetze_xxxxxx_31.01.2011.csv"
@reversion.revision.create_on_success
def handle(self, filepath, **options):
... do something with 'rechnung' ...
rechnung.save()
reversion.comment = "Setzten vom Valuta-Datum nach cronbank csv Abgleich."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment