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. lolAny help would be appreciated.Thank you.
Well, then you should show the code you tried and the error you got. Assuming you have the wifi module installed, and you do something with the output other than just printing it, that code would work fine in a view.
--
DR.
-- 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/d74863ee-f358-4c80-8885-913e6a497fc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment