Mailing List Archive

creating a user
hi,

i know this sounds stupid, but i got lost creating a user...
i can log in to the web interface, but besides listing a lof of things i
cant do anything.

connecting to a "calendar" url (im pretty new to this)
http://localhost/davical/caldav.php/julius/testcalendar/

gives me a user/password prompt.
but how do you actually create a user?
ive been following:
http://wiki.davical.org/index.php/Debian

but it leaves one kinda stranded...
looking at client configurations doesnt help either

my client software: python caldav
https://pypi.python.org/pypi/caldav/0.4.0 says:

python caldav-test.py
Traceback (most recent call last):
File "caldav-test.py", line 25, in <module>
principal = client.principal()
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
line 113, in principal
return Principal(self)
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
line 307, in __init__
cup = self.get_properties([dav.CurrentUserPrincipal()])
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
line 172, in get_properties
response = self._query_properties(props, depth)
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
line 99, in _query_properties
return self._query(root, depth)
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
line 114, in _query
url, body, depth)
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
line 127, in propfind
return self.request(url or self.url, "PROPFIND", props, {'Depth':
str(depth)})
File
"/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
line 242, in request
raise ex
caldav.lib.error.AuthorizationError: AuthorizationError at
'http://localhost:80/davical/caldav.php/julius/testcalendar/', reason
'Unauthorized'






client code:
from datetime import datetime
import caldav
from caldav.elements import dav, cdav

url = "http://localhost/davical/caldav.php/julius/testcalendar/"

vcal = """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VEVENT
UID:1234567890
DTSTAMP:20100510T182145Z
DTSTART:20100512T170000Z
DTEND:20100512T180000Z
SUMMARY:This is an event
END:VEVENT
END:VCALENDAR
"""

client = caldav.DAVClient(url)
principal = client.principal()
calendars = principal.calendars()
if len(calendars) > 0:
calendar = calendars[0]
print "Using calendar", calendar



print "Looking for events in 2010-05"
results = calendar.date_search(
datetime(2015, 5, 1), datetime(2016, 9, 12))

for event in results:
print "Found", event




how do you get a successfull connection?
Re: creating a user [ In reply to ]
Hi,



I’m not sure if I get you right, but for adding a new user to DAViCal (after logging in as admin) you have to click on User functions/Create Principal. I’m not 100% sure about the actual English menu item text, because my installation is running in German, but it should be close enough to find it.



After having done so you can access the calendar/contacts for this user by using a CalDAV/CardDAV client.





Regards,

Ingo.





Von: peter [mailto:commercials24@yahoo.de]
Gesendet: Samstag, 29. August 2015 15:31
An: davical-general@lists.sourceforge.net
Betreff: [Davical-general] creating a user



hi,

i know this sounds stupid, but i got lost creating a user...
i can log in to the web interface, but besides listing a lof of things i cant do anything.

connecting to a "calendar" url (im pretty new to this)
http://localhost/davical/caldav.php/julius/testcalendar/

gives me a user/password prompt.
but how do you actually create a user?
ive been following:
http://wiki.davical.org/index.php/Debian

but it leaves one kinda stranded...
looking at client configurations doesnt help either

my client software: python caldav https://pypi.python.org/pypi/caldav/0.4.0 says:

python caldav-test.py
Traceback (most recent call last):
File "caldav-test.py", line 25, in <module>
principal = client.principal()
File "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py", line 113, in principal
return Principal(self)
File "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py", line 307, in __init__
cup = self.get_properties([dav.CurrentUserPrincipal()])
File "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py", line 172, in get_properties
response = self._query_properties(props, depth)
File "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py", line 99, in _query_properties
return self._query(root, depth)
File "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py", line 114, in _query
url, body, depth)
File "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py", line 127, in propfind
return self.request(url or self.url, "PROPFIND", props, {'Depth': str(depth)})
File "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py", line 242, in request
raise ex
caldav.lib.error.AuthorizationError: AuthorizationError at 'http://localhost:80/davical/caldav.php/julius/testcalendar/', reason 'Unauthorized'






client code:
from datetime import datetime
import caldav
from caldav.elements import dav, cdav

url = <http://localhost/davical/caldav.php/julius/testcalendar/> "http://localhost/davical/caldav.php/julius/testcalendar/"

vcal = """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VEVENT
UID:1234567890
DTSTAMP:20100510T182145Z
DTSTART:20100512T170000Z
DTEND:20100512T180000Z
SUMMARY:This is an event
END:VEVENT
END:VCALENDAR
"""

client = caldav.DAVClient(url)
principal = client.principal()
calendars = principal.calendars()
if len(calendars) > 0:
calendar = calendars[0]
print "Using calendar", calendar



print "Looking for events in 2010-05"
results = calendar.date_search(
datetime(2015, 5, 1), datetime(2016, 9, 12))

for event in results:
print "Found", event




how do you get a successfull connection?
Re: creating a user [ In reply to ]
You should visit your http://localhost/davical/ and access with admin
account. There you will find administration website to create and modify
principals/users.

Later, you will be able to access your calendar(s) with a CalDAV client
software.


El 29/08/15 a les 15:30, peter ha escrit:
> hi,
>
> i know this sounds stupid, but i got lost creating a user...
> i can log in to the web interface, but besides listing a lof of things i
> cant do anything.
>
> connecting to a "calendar" url (im pretty new to this)
> http://localhost/davical/caldav.php/julius/testcalendar/
>
> gives me a user/password prompt.
> but how do you actually create a user?
> ive been following:
> http://wiki.davical.org/index.php/Debian
>
> but it leaves one kinda stranded...
> looking at client configurations doesnt help either
>
> my client software: python caldav
> https://pypi.python.org/pypi/caldav/0.4.0 says:
>
> python caldav-test.py
> Traceback (most recent call last):
> File "caldav-test.py", line 25, in <module>
> principal = client.principal()
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 113, in principal
> return Principal(self)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 307, in __init__
> cup = self.get_properties([dav.CurrentUserPrincipal()])
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 172, in get_properties
> response = self._query_properties(props, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 99, in _query_properties
> return self._query(root, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 114, in _query
> url, body, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 127, in propfind
> return self.request(url or self.url, "PROPFIND", props, {'Depth':
> str(depth)})
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 242, in request
> raise ex
> caldav.lib.error.AuthorizationError: AuthorizationError at
> 'http://localhost:80/davical/caldav.php/julius/testcalendar/', reason
> 'Unauthorized'
>
>
>
>
>
>
> client code:
> from datetime import datetime
> import caldav
> from caldav.elements import dav, cdav
>
> url = "http://localhost/davical/caldav.php/julius/testcalendar/"
>
> vcal = """BEGIN:VCALENDAR
> VERSION:2.0
> PRODID:-//Example Corp.//CalDAV Client//EN
> BEGIN:VEVENT
> UID:1234567890
> DTSTAMP:20100510T182145Z
> DTSTART:20100512T170000Z
> DTEND:20100512T180000Z
> SUMMARY:This is an event
> END:VEVENT
> END:VCALENDAR
> """
>
> client = caldav.DAVClient(url)
> principal = client.principal()
> calendars = principal.calendars()
> if len(calendars) > 0:
> calendar = calendars[0]
> print "Using calendar", calendar
>
>
>
> print "Looking for events in 2010-05"
> results = calendar.date_search(
> datetime(2015, 5, 1), datetime(2016, 9, 12))
>
> for event in results:
> print "Found", event
>
>
>
>
> how do you get a successfull connection?
>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general
>

------------------------------------------------------------------------------
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: creating a user [ In reply to ]
Hi Peter,

Did you try to connect to http://localhost/davical with a web browser?
You should then logon with admin account and create a principal.
Then, you can access to this new principal with a calendaring software
(Thunderbird + Lightning for example, but python caldav sounds good).

Cyril.


Le 29/08/2015 15:30, peter a écrit :
> hi,
>
> i know this sounds stupid, but i got lost creating a user...
> i can log in to the web interface, but besides listing a lof of things i
> cant do anything.
>
> connecting to a "calendar" url (im pretty new to this)
> http://localhost/davical/caldav.php/julius/testcalendar/
>
> gives me a user/password prompt.
> but how do you actually create a user?
> ive been following:
> http://wiki.davical.org/index.php/Debian
>
> but it leaves one kinda stranded...
> looking at client configurations doesnt help either
>
> my client software: python caldav
> https://pypi.python.org/pypi/caldav/0.4.0 says:
>
> python caldav-test.py
> Traceback (most recent call last):
> File "caldav-test.py", line 25, in <module>
> principal = client.principal()
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 113, in principal
> return Principal(self)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 307, in __init__
> cup = self.get_properties([dav.CurrentUserPrincipal()])
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 172, in get_properties
> response = self._query_properties(props, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 99, in _query_properties
> return self._query(root, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/objects.py",
> line 114, in _query
> url, body, depth)
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 127, in propfind
> return self.request(url or self.url, "PROPFIND", props, {'Depth':
> str(depth)})
> File
> "/home/julius/.local/lib/python2.7/site-packages/caldav/davclient.py",
> line 242, in request
> raise ex
> caldav.lib.error.AuthorizationError: AuthorizationError at
> 'http://localhost:80/davical/caldav.php/julius/testcalendar/', reason
> 'Unauthorized'
>
>
>
>
>
>
> client code:
> from datetime import datetime
> import caldav
> from caldav.elements import dav, cdav
>
> url = "http://localhost/davical/caldav.php/julius/testcalendar/"
>
> vcal = """BEGIN:VCALENDAR
> VERSION:2.0
> PRODID:-//Example Corp.//CalDAV Client//EN
> BEGIN:VEVENT
> UID:1234567890
> DTSTAMP:20100510T182145Z
> DTSTART:20100512T170000Z
> DTEND:20100512T180000Z
> SUMMARY:This is an event
> END:VEVENT
> END:VCALENDAR
> """
>
> client = caldav.DAVClient(url)
> principal = client.principal()
> calendars = principal.calendars()
> if len(calendars) > 0:
> calendar = calendars[0]
> print "Using calendar", calendar
>
>
>
> print "Looking for events in 2010-05"
> results = calendar.date_search(
> datetime(2015, 5, 1), datetime(2016, 9, 12))
>
> for event in results:
> print "Found", event
>
>
>
>
> how do you get a successfull connection?
>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general
>


------------------------------------------------------------------------------
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general