On 09/12/2016 01:17 PM, Jeff Sadowski via samba wrote:> This thread has me thinking about good ways to use python with web pages. > Maybe php or just flat HTML for the main page and have python work with cgi > to pass information with json's using AJAX > > Any thoughts on this?cgi is probably not what you want to do I doubt you want to make things complex by mixing php and python. If you have not written stuff in python, you may find you like it better than php. I suggest you take a look at pyramid, or flask as one of python web frameworks. Probably flask would be good choice. I have thought about writing web UI to do most of what an account operator would do with the aduc tool. So -- if anyone wants to start a project doing using one of the python web frameworks, please announce it on this list. I would love to participate. I have tried looking at the python api for samba-tool and there is too much old information on the web about how to use it so I gave up. Perhaps writing a webui using that api would be good we to get it documented. (but then its been more than a year since I last looked for documentation on how to use the python samba api, maybe its changed)> > I started using php many years ago and always ended up using php itself the > same way with an HTML page heavy with javascript that made ajax calls to > update itself from other php pages using ajax. > Maybe php for authentication with COOKIES? >-- David Bear 602-903-6476
On Tue, 13 Sep 2016 10:03:12 -0700 David Bear via samba <samba at lists.samba.org> wrote:> On 09/12/2016 01:17 PM, Jeff Sadowski via samba wrote: > > This thread has me thinking about good ways to use python with web > > pages. Maybe php or just flat HTML for the main page and have > > python work with cgi to pass information with json's using AJAX > > > > Any thoughts on this? > cgi is probably not what you want to do > I doubt you want to make things complex by mixing php and python. > If you have not written stuff in python, you may find you like it > better than php. I suggest you take a look at pyramid, or flask as > one of python web frameworks. Probably flask would be good choice. > > I have thought about writing web UI to do most of what an account > operator would do with the aduc tool. So -- if anyone wants to start a > project doing using one of the python web frameworks, please announce > it on this list. I would love to participate. > > I have tried looking at the python api for samba-tool and there is too > much old information on the web about how to use it so I gave up. > Perhaps writing a webui using that api would be good we to get it > documented. > > (but then its been more than a year since I last looked for > documentation on how to use the python samba api, maybe its changed) > > > > > > I started using php many years ago and always ended up using php > > itself the same way with an HTML page heavy with javascript that > > made ajax calls to update itself from other php pages using ajax. > > Maybe php for authentication with COOKIES? > > > >I you talking about something like the attached screenshot ? Rowland
I would also go the API route. The idea is to build an API that clients can consume. This is the most flexible way. I have the expertise in building API's, I lack Samba/ AD expertise and of course, time :) I hope to make some time during winter hollidays to work on something. Regards, On 13.09.2016 20:03, David Bear via samba wrote:> On 09/12/2016 01:17 PM, Jeff Sadowski via samba wrote: >> This thread has me thinking about good ways to use python with web pages. >> Maybe php or just flat HTML for the main page and have python work with cgi >> to pass information with json's using AJAX >> >> Any thoughts on this? > cgi is probably not what you want to do > I doubt you want to make things complex by mixing php and python. > If you have not written stuff in python, you may find you like it better > than php. I suggest you take a look at pyramid, or flask as one of > python web frameworks. Probably flask would be good choice. > > I have thought about writing web UI to do most of what an account > operator would do with the aduc tool. So -- if anyone wants to start a > project doing using one of the python web frameworks, please announce it > on this list. I would love to participate. > > I have tried looking at the python api for samba-tool and there is too > much old information on the web about how to use it so I gave up. > Perhaps writing a webui using that api would be good we to get it > documented. > > (but then its been more than a year since I last looked for > documentation on how to use the python samba api, maybe its changed) > > >> >> I started using php many years ago and always ended up using php itself the >> same way with an HTML page heavy with javascript that made ajax calls to >> update itself from other php pages using ajax. >> Maybe php for authentication with COOKIES? >> > >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20160913/c68c2b52/signature.sig>
YES! What is it called ? On Tue, Sep 13, 2016 at 10:43 AM, Rowland Penny <rpenny at samba.org> wrote:> On Tue, 13 Sep 2016 10:03:12 -0700 > David Bear via samba <samba at lists.samba.org> wrote: > > > On 09/12/2016 01:17 PM, Jeff Sadowski via samba wrote: > > > This thread has me thinking about good ways to use python with web > > > pages. Maybe php or just flat HTML for the main page and have > > > python work with cgi to pass information with json's using AJAX > > > > > > Any thoughts on this? > > cgi is probably not what you want to do > > I doubt you want to make things complex by mixing php and python. > > If you have not written stuff in python, you may find you like it > > better than php. I suggest you take a look at pyramid, or flask as > > one of python web frameworks. Probably flask would be good choice. > > > > I have thought about writing web UI to do most of what an account > > operator would do with the aduc tool. So -- if anyone wants to start a > > project doing using one of the python web frameworks, please announce > > it on this list. I would love to participate. > > > > I have tried looking at the python api for samba-tool and there is too > > much old information on the web about how to use it so I gave up. > > Perhaps writing a webui using that api would be good we to get it > > documented. > > > > (but then its been more than a year since I last looked for > > documentation on how to use the python samba api, maybe its changed) > > > > > > > > > > I started using php many years ago and always ended up using php > > > itself the same way with an HTML page heavy with javascript that > > > made ajax calls to update itself from other php pages using ajax. > > > Maybe php for authentication with COOKIES? > > > > > > > > > I you talking about something like the attached screenshot ? > > Rowland >-- David Bear mobile: (602) 903-6476
On Fri, 16 Sep 2016 07:34:19 -0700 David Bear <dwbear75 at gmail.com> wrote:> AWESOME!!! -- but its PHP;-) > Is it available on github? > > On Thu, Sep 15, 2016 at 11:40 PM, Rowland Penny <rpenny at samba.org> > wrote: > > > On Thu, 15 Sep 2016 17:25:51 -0700 > > David Bear <dwbear75 at gmail.com> wrote: > > > > > YES! What is it called ? > > > > > > > > > > Well, at the moment, I call it 'Swan', it has its faults (minor) > > and is based around php and a modified adldap. > > > > Rowland > > > > >Nothing wrong with php ;-) well there wasn't when I wrote it. I am now considering reconsidering re-writing it with python & web.py The only place you will find it is on one of my HDs Rowland