Changeset 11737


Ignore:
Timestamp:
6 Jul 2014, 16:15:52 (10 years ago)
Author:
Henrik Bettermann
Message:

Append hash '#' also to datetimes to circumvent unwanted excel automatic.

Location:
main/waeup.kofa/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r11733 r11737  
    441.3dev (unreleased)
    55===================
     6
     7* Append hash '#' also to datetimes to circumvent unwanted excel automatic.
    68
    79* Method for (customizable) application passport upload requirements added.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r10831 r11737  
    7676            'basic,0.0,dp2012,'
    7777            '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",'
    78             '2012-01-31 23:00:00+00:00,0,,app,2012-01-01 12:00:00+00:00,1,'
     78            '2012-01-31 23:00:00+00:00#,0,,app,2012-01-01 12:00:00+00:00#,1,'
    7979            'General Studies 2012/13,2012\r\n'
    8080            )
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_payment_data.csv

    r9467 r11737  
    22,paid,schoolfee,3816951290797973744#,1,2010,19500,BTECHBDT,19500,0942,00,2010/11/26 19:59:33.744 GMT+1,online,1
    33100001,unpaid,schoolfee,3816951290712593757,,2010,0,BTECHBDT,19500.1,0942,Z0,2010-11-25 20:16:33.757 WAT,online,0
    4 ,paid,schoolfee,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01,online,1
    5 ,paid,schoolfee,ABC-11-1234567890,3,2011,19500,BTECHBDT,19500.6,,SC,2010/02/15 13:19:01,sc,1
     4,paid,schoolfee,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01#,online,1
     5,paid,schoolfee,ABC-11-1234567890,3,2011,19500,BTECHBDT,19500.6,,SC,2010/02/15 13:19:01#,sc,1
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r11730 r11737  
    677677            'r_code,r_desc,student_id,state,current_session\r\n'
    678678
    679             ',0.0,2012-04-01 13:12:01,,1,,,,,unpaid,,0.0,,,,,\r\n'
     679            ',0.0,2012-04-01 13:12:01#,,1,,,,,unpaid,,0.0,,,,,\r\n'
    680680            )
    681681        return
     
    695695            'r_code,r_desc,student_id,state,current_session\r\n'
    696696
    697             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,'
    698             'p-item,100,2012,paid,2012-04-01 14:12:01,12.12,'
     697            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
     698            'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
    699699            'r-code,,A111111,created,2012\r\n'
    700700            )
     
    714714            'r_code,r_desc,student_id,state,current_session\r\n'
    715715
    716             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,'
    717             'p-item,100,2012,paid,2012-04-01 14:12:01,12.12,'
     716            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
     717            'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
    718718            'r-code,,A111111,created,2012\r\n'
    719719            )
     
    733733            'r_code,r_desc,student_id,state,current_session\r\n'
    734734
    735             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,'
    736             'p-item,100,2012,paid,2012-04-01 14:12:01,12.12,'
     735            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
     736            'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
    737737            'r-code,,A111111,created,2012\r\n'
    738738            )
     
    755755            'r_code,r_desc,student_id,state,current_session\r\n'
    756756
    757             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,'
    758             'p-item,100,2012,paid,2012-04-01 14:12:01,12.12,'
     757            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
     758            'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
    759759            'r-code,,A111111,created,2012\r\n'
    760760            )
     
    790790            'r_code,r_desc,student_id,state,current_session\r\n'
    791791
    792             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,'
    793             'p-item,100,2012,paid,2012-04-01 14:12:01,12.12,'
     792            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,'
     793            'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,'
    794794            'r-code,,A111111,created,2012\r\n'
    795795            )
     
    842842            'state,current_session,entry_session,entry_mode,faccode,depcode,certcode\r\n'
    843843
    844             '666,12.12,2012-04-01 13:12:01,schoolfee,1,my-id,p-item,100,2012,'
    845             'paid,2012-04-01 14:12:01,12.12,r-code,,A111111,234,123,'
     844            '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,'
     845            'paid,2012-04-01 14:12:01#,12.12,r-code,,A111111,234,123,'
    846846            'Anna,M.,Tester,created,2012,2010,ug_ft,NA,NA,CERT1\r\n'
    847847            )
     
    882882            'bed,bed_coordinates,bed_type,booking_code,booking_date,'
    883883            'booking_session,student_id,actual_bed_type\r\n'
    884             'hall-1_A_101_A,,,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>,,,regular_male_fr\r\n'
     884            'hall-1_A_101_A,,,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>#,,,regular_male_fr\r\n'
    885885            )
    886886        return
     
    898898            'bed,bed_coordinates,bed_type,booking_code,booking_date,'
    899899            'booking_session,student_id,actual_bed_type\r\n'
    900             'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>,2004,'
     900            'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>#,2004,'
    901901            'A111111,regular_male_fr\r\n'
    902902            )
     
    914914            'bed,bed_coordinates,bed_type,booking_code,booking_date,'
    915915            'booking_session,student_id,actual_bed_type\r\n'
    916             'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>,2004,'
     916            'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>#,2004,'
    917917            'A111111,regular_male_fr\r\n'
    918918            )
     
    930930            'bed,bed_coordinates,bed_type,booking_code,booking_date,'
    931931            'booking_session,student_id,actual_bed_type\r\n'
    932             'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>,2004,'
     932            'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>#,2004,'
    933933            'A111111,regular_male_fr\r\n'
    934934            )
     
    949949            'bed,bed_coordinates,bed_type,booking_code,booking_date,'
    950950            'booking_session,student_id,actual_bed_type\r\n'
    951             'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>,'
     951            'hall-1_A_101_A,,any bed type,,<YYYY-MM-DD hh:mm:ss>.<6-DIGITS>#,'
    952952            '2004,A111111,regular_male_fr\r\n')
    953953        return
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r10027 r11737  
    425425            value = value.encode('utf-8')
    426426        elif isinstance(value, datetime.datetime):
    427             value = str(value)
     427            #value = str(value)
     428            value = str('%s#' % value) # changed 2014-07-06, see ticket #941
    428429        elif isinstance(value, datetime.date):
    429430            # Order is important here: check for date after datetime as
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_batching.py

    r9797 r11737  
    282282        self.assertEqual(result6, '2012-04-01#')
    283283        # datetimes are formatted as yyyy-mm-dd hh:mm:ss
    284         self.assertEqual(result7, '2012-04-01 12:01:01')
     284        self.assertEqual(result7, '2012-04-01 12:01:01#')
    285285        return
    286286
Note: See TracChangeset for help on using the changeset viewer.