import keyring
try:
keyring.get_keyring()
keyring.set_password("system", "user", "passWORD")
pword = keyring.get_password("system", "user")
print pword
except Exception as e:
print e
I moved the code to Django (views.py):
from django.http import HttpResponse
import keyring
def index(request):
try:
keyring.get_keyring()
keyring.set_password("system", "user", "passWORD")
pword = keyring.get_password("system", "user")
return HttpResponse(pword)
except Exception as e:
return HttpResponse(e)
Then I asked Django to run built-in development server by typing: sudo python manage.py runserver
Finally I browsed to correct localhost url. Result: browser was showing dialog requesting me to create (on first try) and then open (on next tries after I have created it) kdewallet.
Is it possible to use Keyring from Django without need for user interaction (= without those dialogs)? in the other words: how to configure Keyring to be used with Django?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/85dd1093-6f54-4aea-b8ff-d48e67b54942%40googlegroups.com.