Sunday, January 3, 2016

Running Python3 code and placing results in a view

Hello all,

    I am interested in running the code of: 
#!/usr/bin/python3
from wifi import Cell, Scheme
ssid
= [cell.ssid for cell in Cell.all('wlan0')]
print(ssids)


with a view in Django and the results displayed in a drop down list.  Here is the information about the WIfi module that I am using: https://wifi.readthedocs.org/en/latest/ 

I am still trying to comprehend how the whole flow goes when creating views and I read that you can define a function in Django views and that should just about do it.  I tried to write a function, but that did not work out so well. lol

Any help would be appreciated.
Thank you.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/454ac56d-ef2f-45e2-9cf8-8ab90dcddb47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment