コード例 #1
0
ファイル: views.py プロジェクト: teppok/bandplanner
def append_data(year, month, calendar_id, username):
    c = Calendar.get_calendar(calendar_id)
    if (c == None):
        return None

    if username == None:
        user = None
    else:
        user = SoftUser.create_softuser(username)
    
    currDate = datetime.date.today()

    if year is None:
        year = currDate.year
    else:
        year = int(year)
        
    if month is None:
        month = currDate.month
    else:
        month = int(month)
        
    return (year, month, c, user)