dev temporaire
This commit is contained in:
@@ -52,24 +52,7 @@ def view_op_caldav(request):
|
||||
@xframe_options_exempt
|
||||
def view_dayly_caldav(request):
|
||||
ret = ""
|
||||
caldav_url = "https://sync.infomaniak.com"
|
||||
caldav_user = 'SC01066'
|
||||
caldav_password = "mc144*1870CLERC"
|
||||
myClient = cls_caldav_client()
|
||||
|
||||
client = cal.DAVClient(url=caldav_url, username=caldav_user, password=caldav_password)
|
||||
|
||||
my_principal = client.principal()
|
||||
calendars = my_principal.calendars()
|
||||
if calendars:
|
||||
## Some calendar servers will include all calendars you have
|
||||
## access to in this list, and not only the calendars owned by
|
||||
## this principal.
|
||||
print("your principal has %i calendars:" % len(calendars))
|
||||
ret += "your principal has %i calendars:" % len(calendars)
|
||||
for c in calendars:
|
||||
print(" Name: %-20s URL: %s" % (c.name, c.url))
|
||||
ret += " Name: %-20s URL: %s" % (c.name, c.url) + "<br>\n"
|
||||
else:
|
||||
print("your principal has no calendars")
|
||||
|
||||
return HttpResponse(ret)
|
||||
|
Reference in New Issue
Block a user