Re: Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-29 Thread Benjamin SOULAS
Hello,

Currently I integrate VueJS, it works like a charm, the documentation is
awesome

Le jeu. 29 nov. 2018 21:17, Jani Tiainen  a écrit :

> Also there exist ExtJS, Dojo Toolkit and at least Svelte which I've
> tried...
>
> kennedy kay  kirjoitti to 29. marrask. 2018 klo
> 21.25:
>
>> For me personally I would recommend AngularJS. Not just because it easy
>> to integrate with Django but because you can also create mobile
>> applications on the fly.
>>
>> --
>> 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+unsubscr...@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/53e1bfd4-ef11-4fa6-afbb-9a172337d2e4%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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+unsubscr...@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/CAHn91ofO3d7wXu9z6w1h8fvoG0fiUsaT-QJcye%3DiT7J7ZWH9wA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CABG7fFXdStQmKji%3DK4wRhdGhbZBQ2SdkatJzN9td_QNrmkB6bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: python manage.py runserver

2018-11-15 Thread Benjamin SOULAS
could you give us the context? what the error is?

Le jeu. 15 nov. 2018 19:14,  a écrit :

> python manage.py runserver isnt running with me
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> 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+unsubscr...@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/430cec4b-0301-44af-9654-a03eafec4fd5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CABG7fFXxoMPaHWaGGnGHPCE-CL%2BBra1yNzUp7VhNTwu1AFSr%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to connect mongo DB with django2.1

2018-09-19 Thread Benjamin SOULAS
Hi Akshat,

Could you be more specific? Do you have some code to provide to us in order 
to help you? Do you have errors?

Pymongo is a good lib if you intend not to use the Django ORM, if you want 
to use the ORM, Djongo exists, or others ODMs

Kind regards,

Benjamin

-- 
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+unsubscr...@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/c79d8ab9-9800-4d64-9d21-9436e7645ff3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Kerberos authent implementation

2018-09-13 Thread Benjamin SOULAS
Thanks a lot for your response, we use django-auth-ldap too, for openldap, 
but for regular AD, I am still waiting some stuff, I started to modify my 
settings.py, hope this works.

No problem for Kerberos, maybe someone will read my post and give advices !

-- 
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+unsubscr...@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/63052bee-c4b1-4cd6-aeab-d6c6107f98fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Kerberos authent implementation

2018-09-13 Thread Benjamin SOULAS
No problem. I have to develop an app for customers assuming they can have 
different authentication system (just for information: I am discovering 
LDAP, RADIUS, Kerberos and others for a few days, I don't have skills in 
that).

The aim of our app is to adapt itself depending if the customer has an 
OpenLDAP authentication system, an Active Directory authentication system, 
Kerberos, Kerberos + LDAP (I don't really understand that one ...as I 
understood, Kerberos is just a communication protocol based on tickets), 
RADIUS authentication system.

So for now, I successfully authenticate OpenLDAP users (Active Directory is 
coming), but I need to investigate every possibilities, which django 
packages are available or not (if they exists, do they suits our needs, if 
not, how to write our own backends)

Kind regards,

Benjamin.

-- 
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+unsubscr...@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/eff01ad3-6969-481c-9fd5-90ac4ef79692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Kerberos authent implementation

2018-09-13 Thread Benjamin SOULAS
Hello every one, 

I would like to test Kerberos authentication. Can someone give me advices? 
I saw Django-kerberos and django-auth-kerberos, but there are not much 
maintenairs on those, so is it more appropriate to develop my own Django 
Backend to handle this authentication?

I don't see much documentation (or full tutorial), any advices is welcome :)

Kind regards.

Benjamin

-- 
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+unsubscr...@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/db11d982-7599-47f7-878e-0922c19c288f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Models which link to Groups (by ForeignKey)

2018-09-10 Thread Benjamin SOULAS
Ow, ok, I got it, thx a lot

But in order to create this object (retrieve my groups from the ORM), 
should I implement something specific? Because for my request, I just want 
to specify the group names and then, in my app, retrieve those, create my 
link between the groups...

I thought I had to retrieve the groups in my GroupLinkerSerializer and, 
then, create my instance, but to create it (correct me if I am wrong), I 
should retrieve Group objects and instantiate my GroupLinkerSerializer AND 
create it (with .create method) right?

I am not comfortable with the regular process, my API don't use a lot the 
ORM (only for User, Groups and Permissions).

Kind regards,

Benjamin

-- 
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+unsubscr...@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/468f8e3d-7e54-4739-9c8c-c344c2027a02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Models which link to Groups (by ForeignKey)

2018-09-10 Thread Benjamin SOULAS
Hello everyone,

I want to implement a model which make references to 2 groups, to do this, 
I thought I had to defined, in the model which links the 2 groups, a 
foreign key for each Group like this:

from django.contrib.auth.models import Group
from django.db import models


class GroupLinker(models.Model):
EMSGroup = models.ForeignKey(Group, on_delete=models.CASCADE)
LDAPGroup = models.ForeignKey(Group, on_delete=models.CASCADE)


But I got that error: 

ERRORS:
api.GroupLinker.EMSGroup: (fields.E304) Reverse accessor for 
'GroupLinker.EMSGroup' clashes with reverse accessor for 
'GroupLinker.LDAPGroup'.
HINT: Add or change a related_name argument to the definition for 
'GroupLinker.EMSGroup' or 'GroupLinker.LDAPGroup'.
api.GroupLinker.LDAPGroup: (fields.E304) Reverse accessor for 
'GroupLinker.LDAPGroup' clashes with reverse accessor for 
'GroupLinker.EMSGroup'.
HINT: Add or change a related_name argument to the definition for 
'GroupLinker.LDAPGroup' or 'GroupLinker.EMSGroup'.

I don't understand why I should add a related name, because my future table 
will just link my 2 groups right? Where am I wrong?

Kind regards,

Benjamin.

-- 
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+unsubscr...@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/d3edbdd1-3bfa-43ec-9565-e2665bb0c878%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-10 Thread Benjamin SOULAS
Finally I recreate a new DB and it works now

-- 
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+unsubscr...@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/e7e40bf2-3bb8-42b0-a69c-9be2c149c6e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-10 Thread Benjamin SOULAS
Hi Andréas,

Yes you are absolutely right, because I am still coding a POC to test some 
module features, I think I forgot to delete it. Now the make migrations and 
migrate works, BUT it didn't create the expected table, so still have an 
issue on that, hope to find quickly what happened?

Regards,

Benjamin

-- 
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+unsubscr...@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/7b678fc2-c284-4ce6-bc39-4bc7646501dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
Ok ... Shame ... i found, One day I created a "models" directory to store 
my models ... So because of this, it didn't make any migrations ...

Sorry for the inconvenience, but now I know I have to take care about my 
folder naming convention ...

Kind regards

Benjamin.

-- 
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+unsubscr...@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/2833a84d-296b-4669-ac94-d1a83a293c7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
I agree it should, but it doesn't, better, it does not find my model:

[image: project_structure.png]


[image: issue__init__.png]





-- 
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+unsubscr...@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/869963f4-81c9-42aa-9fbf-618291e3b2f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
Ok, so I think I really have a much deeper problem, __init__.py file are 
there, nothing still happen 

Le vendredi 7 septembre 2018 16:31:01 UTC+2, Andréas Kühne a écrit :
>
> If you follow the way Mike suggests - migrations will work (this is the 
> way we do it in our plattform). The important thing is that you MUST have a 
> models.py file OR a models module (a directory with the name models and a 
> __init__.py file with the imports from the individual files).
>
> Regards,
>
> Andréas
>
>
> Den fre 7 sep. 2018 kl 16:27 skrev Benjamin SOULAS  >:
>
>> Hi Mike (again !),
>>
>> Okay, but it seems I have a much deeper problem, nothing happens during 
>> make migration command, I am thinking on deleting my db and restart from 
>> scratch ...
>>
>> Thanks ! 
>>
>> Le vendredi 7 septembre 2018 16:25:21 UTC+2, Mike Dewhirst a écrit :
>>>
>>> Easy
>>>
>>> Create a models directory. In there make __init__.py file and in there 
>>> ...
>>>
>>> from .whatever import Whatever
>>> ... 100 classes
>>>
>>> Then in ./models create 100 files with one model class in each file
>>>
>>> Anywhere in the project you can say ...
>>>
>>> from app.models import Whatever
>>>
>>>
>>>
>>> *Connected by Motorola*
>>>
>>>
>>> Benjamin SOULAS  wrote:
>>>
>>> Hi everyone,
>>>
>>> Quick question I do not find the answer: does models have to located 
>>> into *models.py* script? It believe not, If I got a project composed of 
>>> 100 tables, it's weird to me that all models should be located here ...
>>>
>>> I tried, in this file, to import a model located somewhere else, but 
>>> when i run *python manage.py makemigrations*, nothing happens, any idea?
>>>
>>> Kind regards
>>>
>>> Benjamin
>>>
>>> -- 
>>> 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 post to this group, send email to django...@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/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> 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 post to this group, send email to django...@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/65c0b624-886c-46f7-9776-91971564d8d8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/65c0b624-886c-46f7-9776-91971564d8d8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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+unsubscr...@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/4298cf98-cad3-413d-a7bc-2a8e587b2ba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
Hi Mike (again !),

Okay, but it seems I have a much deeper problem, nothing happens during 
make migration command, I am thinking on deleting my db and restart from 
scratch ...

Thanks ! 

Le vendredi 7 septembre 2018 16:25:21 UTC+2, Mike Dewhirst a écrit :
>
> Easy
>
> Create a models directory. In there make __init__.py file and in there ...
>
> from .whatever import Whatever
> ... 100 classes
>
> Then in ./models create 100 files with one model class in each file
>
> Anywhere in the project you can say ...
>
> from app.models import Whatever
>
>
>
> *Connected by Motorola*
>
>
> Benjamin SOULAS > wrote:
>
> Hi everyone,
>
> Quick question I do not find the answer: does models have to located into 
> *models.py* script? It believe not, If I got a project composed of 100 
> tables, it's weird to me that all models should be located here ...
>
> I tried, in this file, to import a model located somewhere else, but when 
> i run *python manage.py makemigrations*, nothing happens, any idea?
>
> Kind regards
>
> Benjamin
>
> -- 
> 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 post to this group, send email to django...@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/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/65c0b624-886c-46f7-9776-91971564d8d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
Ok, but importing external scripts (but still in the project) should work?

Even adding my model code inside models.py, no migration happens.

Le vendredi 7 septembre 2018 16:18:47 UTC+2, Gerald Brown a écrit :
>
> There should be a models.py file under each of your applications.
>
> On Friday, 07 September, 2018 10:06 PM, Benjamin SOULAS wrote:
>
> Hi everyone, 
>
> Quick question I do not find the answer: does models have to located into 
> *models.py* script? It believe not, If I got a project composed of 100 
> tables, it's weird to me that all models should be located here ...
>
> I tried, in this file, to import a model located somewhere else, but when 
> i run *python manage.py makemigrations*, nothing happens, any idea?
>
> Kind regards
>
> Benjamin
> -- 
> 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 post to this group, send email to django...@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/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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+unsubscr...@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/60797bc7-1410-48a9-b029-133b4bd41185%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


models.py => Mandatory to create tables?

2018-09-07 Thread Benjamin SOULAS
Hi everyone,

Quick question I do not find the answer: does models have to located into 
*models.py* script? It believe not, If I got a project composed of 100 
tables, it's weird to me that all models should be located here ...

I tried, in this file, to import a model located somewhere else, but when i 
run *python manage.py makemigrations*, nothing happens, any idea?

Kind regards

Benjamin

-- 
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+unsubscr...@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/a4da5a12-9c9b-42b6-b295-5492658cb046%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Subgroups Implementation (from LDAP)

2018-09-07 Thread Benjamin SOULAS
Well indeed, flattening the ldap groups hierarchy could be a solution, but 
I don't know if my boss will be OK with that, we are still thinking about 
implementation and explore the techno we need to implement our features.

But I think I will keep it in mind seriously, because it could resolve the 
ldap groups + subgroups link. Anyway, I think I cannot solve the link 
between my LDAP groups and app groups (which name conventions are obviously 
different) better than create a django "Link" (I have to find a goup name) 
model.

For now, just on the beginning, I implemented functions (in views, should 
find an other way ...) that creates my groups, I don't know (yet) how, when 
your server starts, I can already populate my app Groups without any django 
admin user intervention, I think it can be easily implemented, just have to 
take a look, because doing this in view with a GET or POST request, its 
good enough to see the result in /admin page, but, be honest, so dirty ...

Any way, for now I found a way for my groups retrieval, now, next steps: 
introduce my own groups with their own permissions, implement the Links 
table, find a way to create links between LDAP groups and my app group 
(maybe in /admin, in registering the Link model in admin.py) and then, 
check scenario thought about can be done.

To be honest, you helped me with the flattened representation of the 
groups, thanks a lot for that, now, I think I will follow your advices for 
creating new subjects, I did in django-auth-ldap google groups, but nobody 
answers, this is why I came here ..

Thanks a lot (*Merci beaucoup*!

Kind regards

Le vendredi 7 septembre 2018 09:48:16 UTC+2, Mike Dewhirst a écrit :
>
> On 7/09/2018 4:38 PM, Benjamin SOULAS wrote: 
> > Actually, I don't use ldap groups permission really, 
>
> I'm jumping to conclusions here with inadequate evidence. But I'll go 
> ahead anyway. It makes sense to me that your app being different than 
> the ldap system will have no use for ldap permissions. 
>
> So let me presume that the ldap group names mean something to you. For 
> example I'm guessing ldap group "chief_exec" might translate in your app 
> to "chief_exec". 
>
> I'm also guessing from your subject line that there are ldap groups 
> subordinate to "chief_exec". Perhaps for example "budgeting" or "awards" 
> but which are both ldap sub-groups of "chief_exec" 
>
> To flatten them out you might adopt a naming convention of "chief_exec", 
> "chief_exec_budgeting" and "chief_exec_awards" 
>
> My only interest in this thread really was to suggest such a flattening 
> of the corporate ldap hierarchy into simple Django auth-groups as being 
> a possible solution to the problem as I (mis)understood at the time. 
>
> I don't have sufficient experience with Django-ldap to help with the 
> technicalities. 
>
> I hope I haven't spoiled your flow. Lots of very helpful people on this 
> list will ignore this thread simply because there is already a 
> conversation happening. I suggest you start a new thread with a subject 
> line somewhat different but which really encapsulates the nub of your 
> problem. 
>
> Bon chance! 
>
> Cheers 
>
> Mike 
>
> > I have just configured my settings in which AUTH_LDAP_GROUP_SEARCH 
> > looks for a posixGroup Type (it is what I use for now, but in the 
> > future, it would be logical there will have GroupOfName and other 
> types). 
> > 
> > My aim is to use django-auth-ldap only as authentication, because we 
> > won't be able to know which groups will be implemented and which 
> > Django group will be applied to the LDAP group. I tried to check in 
> > django-auth-ldap source code how groups are handled/retrieved, it 
> > seems relly complicated (I don't know How should I implement the 
> > LDAPBackend and use/override the related method in order to use the 
> > LDAP admin to retrieve all the groups and populate them into the 
> > Django ORM) 
> > 
> > For now, the solution I got is to directly use python-ldap library to 
> > execute a search request in wich I specify the node I want to look at 
> > to retrieve them recursively, and finally, I succeed in populate them) 
> > 
> > For the links between Django groups and LDAP groups, I have no choice 
> > to do this, so I thought I should have to implement a django model 
> > (which aim, like other models, is to store stuff in ORM) which could 
> > have a OneToManyField in order to link several LDAP groups to my 
> > Django groups predefined in my app 
> > 
> > When you say "If you have ldap subgroups I would flatten them into the 
> > smallest denominator and make equivalent auth

Re: Subgroups Implementation (from LDAP)

2018-09-07 Thread Benjamin SOULAS
Actually, I don't use ldap groups permission really, I have just configured 
my settings in which AUTH_LDAP_GROUP_SEARCH looks for a posixGroup Type (it 
is what I use for now, but in the future, it would be logical there will 
have GroupOfName and other types).

My aim is to use django-auth-ldap only as authentication, because we won't 
be able to know which groups will be implemented and which Django group 
will be applied to the LDAP group. I tried to check in django-auth-ldap 
source code how groups are handled/retrieved, it seems relly complicated (I 
don't know How should I implement the LDAPBackend and use/override the 
related method in order to use the LDAP admin to retrieve all the groups 
and populate them into the Django ORM)

For now, the solution I got is to directly use python-ldap library to 
execute a search request in wich I specify the node I want to look at to 
retrieve them recursively, and finally, I succeed in populate them)

For the links between Django groups and LDAP groups, I have no choice to do 
this, so I thought I should have to implement a django model (which aim, 
like other models, is to store stuff in ORM) which could have a 
OneToManyField in order to link several LDAP groups to my Django groups 
predefined in my app

When you say "If you have ldap subgroups I would flatten them into the 
smallest denominator and make equivalent auth-groups." I am not sure to 
understand what it really means and how to implement this, thanks to 
django-auth-ldap? Or as I already done with python-ldap??

I don't think I could chosse a naming convention if, in advance, it is not 
possible to me to know which groups will be retrieved, right?

Le vendredi 7 septembre 2018 01:57:27 UTC+2, Mike Dewhirst a écrit :
>
> On 7/09/2018 12:49 AM, Benjamin SOULAS wrote: 
> > Hi Mike ! 
> > 
> > The problem is our app have to be able to retrieve a Customer LDAP 
> > server. So we won't be able to know groups will be into the LDAP server. 
> > 
> > To be concise, when we'll set up the app, we'll have to retrieve the 
> > LDAP groups, insert them in django ORM, then make the link (with a 
> > table, so a model) between LDAP groups extracted and our App groups 
>
> Are you using django-auth with auth-groups and auth-group-permissions? 
>
> If it was me, I'd set up all the ldap groups as Django auth-groups and 
> preset their permissions. Then all the login backend has to do is check 
> that a user's ldap groups haven't changed. If they have changed then I 
> would have to adjust the auth-groups accordingly. 
>
> If you have ldap subgroups I would flatten them into the smallest 
> denominator and make equivalent auth-groups. 
>
> If you choose a strategic naming convention you could work it out on the 
> fly without needing a mapping table between ldap groups/sub-groups and 
> Django auth-groups. 
>
>
> > 
> > The App permissions will follow the same principle, stored in the 
> > Django ORM (which is the regular case) and thanks to the app 
> > (something django admin-like) we will link the permissions to the App 
> > groups 
> > 
> > I don't know how clear I am ... 
> > 
> > Kind regards 
> > 
> > Benjamin 
> > 
> > Le mercredi 5 septembre 2018 23:51:49 UTC+2, Mike Dewhirst a écrit : 
> > 
> > On 5/09/2018 11:25 PM, Benjamin SOULAS wrote: 
> > > Hi everyone, 
> > > 
> > > I m not expert at all in Django so it can be a silly question but 
> I 
> > > take the risk: 
> > 
> > I'm an expert in nothing! 
> > 
> > What about simplifying things by making your groups have smaller 
> > sets of 
> > permisssions and putting users into multiple groups to suit their 
> > roles. 
> > 
> > 
> > > 
> > > I have to implement *LDAP server* (which work perfectly with 
> > > *django-auth-ldap*, but my question is not related to this 
> > library). I 
> > > was wondering what happens if groups possesses subgroups? Even 
> > if it 
> > > is not handled in the lib, I assume I can override a recursive 
> > > mechanism in order to populate the subgroup in the *auth_group* 
> > table. 
> > > 
> > > BUT my problem is "*How can link subgroups to parent groups*" ? 
> > > Because through */admin* page, If you create a group, you can only 
> > > define its permission and nothing else (which make sens if the 
> > aim is 
> > > to have One level group handling), but if I want to implement 
> > > subgroups, how do you suggest to do it? I found the module 
> > django MPTT 
> > > but d

Re: Subgroups Implementation (from LDAP)

2018-09-06 Thread Benjamin SOULAS
Hi Mike !

The problem is our app have to be able to retrieve a Customer LDAP server. 
So we won't be able to know groups will be into the LDAP server.

To be concise, when we'll set up the app, we'll have to retrieve the LDAP 
groups, insert them in django ORM, then make the link (with a table, so a 
model) between LDAP groups extracted and our App groups

The App permissions will follow the same principle, stored in the Django 
ORM (which is the regular case) and thanks to the app (something django 
admin-like) we will link the permissions to the App groups

I don't know how clear I am ...

Kind regards

Benjamin

Le mercredi 5 septembre 2018 23:51:49 UTC+2, Mike Dewhirst a écrit :
>
> On 5/09/2018 11:25 PM, Benjamin SOULAS wrote: 
> > Hi everyone, 
> > 
> > I m not expert at all in Django so it can be a silly question but I 
> > take the risk: 
>
> I'm an expert in nothing! 
>
> What about simplifying things by making your groups have smaller sets of 
> permisssions and putting users into multiple groups to suit their roles. 
>
>
> > 
> > I have to implement *LDAP server* (which work perfectly with 
> > *django-auth-ldap*, but my question is not related to this library). I 
> > was wondering what happens if groups possesses subgroups? Even if it 
> > is not handled in the lib, I assume I can override a recursive 
> > mechanism in order to populate the subgroup in the *auth_group* table. 
> > 
> > BUT my problem is "*How can link subgroups to parent groups*" ? 
> > Because through */admin* page, If you create a group, you can only 
> > define its permission and nothing else (which make sens if the aim is 
> > to have One level group handling), but if I want to implement 
> > subgroups, how do you suggest to do it? I found the module django MPTT 
> > but does it corresponds to the need? Bur because I already use DRF + 
> > Django + Django-auth-LDAP, does its implementation worth it? 
> > 
> > I though it was possible, thanks to *custom models* which could have 
> > as fields *parent-group* and *subgroup* (and maybe more, still 
> > thinking about it). Once the model is implemented, should I link my 
> > *overriden django-auth-ldap code* to map this Django model in order to 
> > make the links? Or should I think differently? 
> > 
> > Just to be more precise, in my app I will have permissions and groups 
> > defined, the aim is, programmatically or through admin interface make 
> > also the links between the LDAP groups and my app groups (LDAP server 
> > could have every possible trees) 
> > 
> > I don't know if it is clear enough, if not, do not hesitate to ask me 
> > questions, I really need help actually 
> > 
> > Kind regards, 
> > 
> > Benjamin. 
> > -- 
> > 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  
> > <mailto:django-users+unsubscr...@googlegroups.com >. 
> > To post to this group, send email to django...@googlegroups.com 
>  
> > <mailto:django...@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/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
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+unsubscr...@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/c3f81532-95c8-4152-a36e-97eeb68ccb22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Subgroups Implementation (from LDAP)

2018-09-05 Thread Benjamin SOULAS
Hi everyone,

I m not expert at all in Django so it can be a silly question but I take 
the risk:

I have to implement *LDAP server* (which work perfectly with 
*django-auth-ldap*, but my question is not related to this library). I was 
wondering what happens if groups possesses subgroups? Even if it is not 
handled in the lib, I assume I can override a recursive mechanism in order 
to populate the subgroup in the *auth_group* table.

BUT my problem is "*How can link subgroups to parent groups*" ? Because 
through */admin* page, If you create a group, you can only define its 
permission and nothing else (which make sens if the aim is to have One 
level group handling), but if I want to implement subgroups, how do you 
suggest to do it? I found the module django MPTT but does it corresponds to 
the need? Bur because I already use DRF + Django + Django-auth-LDAP, does 
its implementation worth it?

I though it was possible, thanks to *custom models* which could have as 
fields *parent-group* and *subgroup* (and maybe more, still thinking about 
it). Once the model is implemented, should I link my *overriden 
django-auth-ldap code* to map this Django model in order to make the links? 
Or should I think differently?

Just to be more precise, in my app I will have permissions and groups 
defined, the aim is, programmatically or through admin interface make also 
the links between the LDAP groups and my app groups (LDAP server could have 
every possible trees)

I don't know if it is clear enough, if not, do not hesitate to ask me 
questions, I really need help actually

Kind regards,

Benjamin. 

-- 
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+unsubscr...@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/0c3fbcde-5959-4d48-b9eb-75b94a6ff350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.