Re: Tweak admin widget - FilteredSelectMultiple

2020-01-04 Thread Integr@te System
Hi Mike,

As we look at selected_choice result from iterating v over value (line
428), option_value base on choice(line 438).
so we can limit input parameter of value variable from this def().

Hope if heplful.



On Sat, Jan 4, 2020, 11:00 Mike Dewhirst  wrote:

> In the Admin where user group membership is shown and groups can be
> selected from choices derived from auth_groups, I want to control the
> available choices.
>
> It seems the place to do so might be in admin/widgets.py in the
> AutocompleteMixin.optgroups() method a few lines in where it says ...
>
>  choices = (
>  (obj.pk, self.choices.field.label_from_instance(obj))
>  for obj in
> self.choices.queryset.using(self.db).filter(pk__in=selected_choices)
>  )
>
> Could a very kind person explain to me how I can hijack this and remove
> a couple of groups from the resulting choices?
>
> My use case is that I want members of the 'admin' group to be able to
> assign any group membershipto any other userexcept for a couple of
> groups which are too permissive. The excepted groups can only be
> assigned by a Superuser.
>
> Many thanks for any hints
>
> Cheers
>
> Mike
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/52923a2a-cc6c-e335-f5fe-6ec6ab004013%40dewhirst.com.au
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoZ14gH%3D8V1ARk-pnAKNWuVaqG%3D4%3DGSbwO_-0LrP7DFnw%40mail.gmail.com.


Re: How to create form to show user input and return results from DB

2020-01-04 Thread victor jack

Hi Nina , just read your write up 
For some form of clarification to your Confusion I’ll just answer the ones I 
can 

For the database , don’t make two different ones , one database with two tables 
2000 and 2010 will do just fine , just query then right. 

For the forms it is required to use POST cause it is more secure since you are 
POSTING form data ( which I feel is sensitive information)

I hope this helps , if I am free I might check out your github link 

>> On 4 Jan 2020, at 00:12, "nmaxbe...@gmail.com"  wrote:
> 
> Hi,
> 
> I am creating a website that lists my states congressional districts based on 
> the US census (i.e. 2000, 2010 and ultimately to update when the 2020 survey 
> is completed).  The entire exercise is to track how the representation could 
> possibly change based on the US census.
> 
> So far, I have a mock-up for two user inputs: one for 2000 and one for 2010 
> entering their zip codes on the homepage. The user is prompted to input their 
> zip code (for each census year) in order to see their representative for 2000 
> and 2010 (basically pulling from a db to show the results) and the results 
> show on the results page (new tab).
> 
> My confusion: 
> Should I combine the DB's to "respond" to the users input or keep DB's (2000, 
> 2010) separate?
> I understand how to create models and I understand how to create views, but I 
> am confused on creating the form (specifically "GET" vs "POST".
> Is POST what the user inputs? If so, how do I "search through the existing 
> DB"?
> I have reviewed the form docs within Django but still am lost.  Please help.
> As you suspected, I am new to Django but want to "get over this hump".  I 
> feel I am reaching too far and the answer is in front of my face.  My github 
> is: https://github.com/NinaMaxberry/Cornerstone-Project. Once you visit, you 
> will see, I've tried a lot of options.
> 
> Any help would be greatly appreciated.
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/5f1995c7-6e6c-4147-b53b-10373c7b4b31%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/751A25AC-EF77-4519-97D0-A55CC94FDCAD%40gmail.com.


Re: How to create form to show user input and return results from DB

2020-01-04 Thread Integr@te System
Hi friend,

# dont separate bc of the same type of field on one object. ( or find more
zipcode service provider for more options)

# with get/post method you shoud refer more docs, it just view/create
action.

# consider review source, a lot comment in your code base and few err
commands.
Think of zen.



On Sat, Jan 4, 2020, 06:11 nmaxbe...@gmail.com  wrote:

> Hi,
>
> I am creating a website that lists my states congressional districts based
> on the US census (i.e. 2000, 2010 and ultimately to update when the 2020
> survey is completed).  The entire exercise is to track how the
> representation could possibly change based on the US census.
>
> So far, I have a mock-up for two user inputs: one for 2000 and one for
> 2010 entering their zip codes on the homepage. The user is prompted to
> input their zip code (for each census year) in order to see their
> representative for 2000 and 2010 (basically pulling from a db to show the
> results) and the results show on the results page (new tab).
>
> My confusion:
>
>1. Should I combine the DB's to "respond" to the users input or keep
>DB's (2000, 2010) separate?
>2. I understand how to create models and I understand how to create
>views, but I am confused on creating the form (specifically "GET" vs 
> "POST".
>3. Is POST what the user inputs? If so, how do I "search through the
>existing DB"?
>4. I have reviewed the form docs within Django but still am lost.
>Please help.
>
> As you suspected, I am new to Django but want to "get over this hump".  I
> feel I am reaching too far and the answer is in front of my face.  My
> github is: https://github.com/NinaMaxberry/Cornerstone-Project. Once you
> visit, you will see, I've tried a lot of options.
>
> Any help would be greatly appreciated.
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f1995c7-6e6c-4147-b53b-10373c7b4b31%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpdzGaBg4UEcOUfirLq%2BBYUYiDfe-W5rZ1_3JVZHauPgw%40mail.gmail.com.


Multi return values in single function

2020-01-04 Thread nrupesh08
hi,
I design cms design on the company profile website.
5 pages on the website:
 index, about, services, projects, contact.

the problem is, 
to display easily DB to frontend expect index page. because. all mixed 
retrieve DB. just main or sample of the display index page. like., about, 
service, project and contact. 

like,.: def index(request):
content = {}
return render(request, 'index.html', {})

I want, like return values 
 def index(request):
content = {
   about, services(4 services displayed), projects(2 project 
displayed), contact  
}
 return render(request, 'index.html', {})


but, *how to so many return values in one function?*

please help 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com.


Hello Everbody! Happy New Year

2020-01-04 Thread Murilo A. Gigliotti
Hello All,

 

Thanks for the opportunity to stay here in the group.

Let me introduce myself.

My name is Murilo Gigliotti, I am from Brazil and I live in São Paulo city.

I've been studying Python + Django since the beginning of 2019.

Now I am able to help the community with my work.

I have a IT company named Gigliotti Tech - Knowlegde Technologies (Gigliotti 
Tech - Tecnologias do Conhecimento).

The company's web site is   
www.gigliottitech.com.br

Anyway, It's a very pleasure to me to participate of this group.

If you want to talk about projects, please send an email to  
 mur...@gigliottitech.com.br

 

PS: Next month (February 12 to 22) I will be in New York, so let me know if I 
could meet anyone there.

 

See you

Best regards.

 

ASSINATURA DE EMAIL tech

Odoo icone2 Odoo Business Partner

Mais informações visite http://www.gigliottitech.com.br/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/027601d5c30d%2418ca4d00%244a5ee700%24%40com.br.


Re: Multi return values in single function

2020-01-04 Thread Muhammed Rafi A
return render(request, 'index.html', content)


On Sat, Jan 4, 2020, 8:09 PM nrupesh08  wrote:

> hi,
> I design cms design on the company profile website.
> 5 pages on the website:
>  index, about, services, projects, contact.
>
> the problem is,
> to display easily DB to frontend expect index page. because. all mixed
> retrieve DB. just main or sample of the display index page. like., about,
> service, project and contact.
>
> like,.: def index(request):
> content = {}
> return render(request, 'index.html', {})
>
> I want, like return values
>  def index(request):
> content = {
>about, services(4 services displayed), projects(2 project
> displayed), contact
> }
>  return render(request, 'index.html', {})
>
>
> but, *how to so many return values in one function?*
>
> please help 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADwyzwq8F6fgF6ysehw66c_EZLnvS7Erkd5F%2BQusPVCRqB9fQg%40mail.gmail.com.


Re: Hello Everbody! Happy New Year

2020-01-04 Thread Desh Deepak
Wish you the same,

My name is Desh Deepak from New Delhi India.


Can you help me about  django Custom user authentication and  restAPI.

Thanks in advance

Thanks & Regards
Desh Deepak
+91 7011101001




On Sat, 4 Jan 2020, 20:12 Murilo A. Gigliotti, 
wrote:

> Hello All,
>
>
>
> Thanks for the opportunity to stay here in the group.
>
> Let me introduce myself.
>
> My name is Murilo Gigliotti, I am from Brazil and I live in São Paulo city.
>
> I've been studying *Python + Django* since the beginning of 2019.
>
> Now I am able to help the community with my work.
>
> I have a IT company named Gigliotti Tech - Knowlegde Technologies
> (Gigliotti Tech - Tecnologias do Conhecimento).
>
> The company's web site is www.gigliottitech.com.br
>
> Anyway, It's a very pleasure to me to participate of this group.
>
> If you want to talk about projects, please send an email to
> mur...@gigliottitech.com.br
>
>
>
> PS: Next month (February 12 to 22) I will be in New York, so let me know
> if I could meet anyone there.
>
>
>
> See you
>
> Best regards.
>
>
>
> [image: ASSINATURA DE EMAIL tech]
>
> *[image: Odoo icone2] Odoo Business Partner*
>
> Mais informações visite http://www.gigliottitech.com.br/
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/027601d5c30d%2418ca4d00%244a5ee700%24%40com.br
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ0m4xjViq7tRxSHjOiAnrAuqGVZLR6ne%2B%3DqoqM09cOoR-1tcQ%40mail.gmail.com.


RES: Hello Everbody! Happy New Year

2020-01-04 Thread Murilo A. Gigliotti
Hi Desh Deepak

 

Thanks for your message and wishes.

I am gonna send you a WhatsApp message to your phone signature.

Or let me know you own email.

___

Murilo A. Gigliotti

+55 (11) 95272-8600

Alternative email: muril...@gmail.com

 

De: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Em 
nome de Desh Deepak
Enviada em: sábado, 4 de janeiro de 2020 12:03
Para: django-users@googlegroups.com
Assunto: Re: Hello Everbody! Happy New Year

 

Wish you the same,

 

My name is Desh Deepak from New Delhi India.

 

Can you help me about  django Custom user authentication and  restAPI.

 

Thanks in advance

 

Thanks & Regards

Desh Deepak

+91 7011101001

 

On Sat, 4 Jan 2020, 20:12 Murilo A. Gigliotti,  
wrote:

Hello All,

 

Thanks for the opportunity to stay here in the group.

Let me introduce myself.

My name is Murilo Gigliotti, I am from Brazil and I live in São Paulo city.

I've been studying Python + Django since the beginning of 2019.

Now I am able to help the community with my work.

I have a IT company named Gigliotti Tech - Knowlegde Technologies (Gigliotti 
Tech - Tecnologias do Conhecimento).

The company's web site is   
www.gigliottitech.com.br

Anyway, It's a very pleasure to me to participate of this group.

If you want to talk about projects, please send an email to  
 mur...@gigliottitech.com.br

 

PS: Next month (February 12 to 22) I will be in New York, so let me know if I 
could meet anyone there.

 

See you

Best regards.

 

ASSINATURA DE EMAIL tech

Odoo icone2Odoo Business Partner

Mais informações visite http://www.gigliottitech.com.br/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/027601d5c30d%2418ca4d00%244a5ee700%24%40com.br
 

 .

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ0m4xjViq7tRxSHjOiAnrAuqGVZLR6ne%2B%3DqoqM09cOoR-1tcQ%40mail.gmail.com
 

 .

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/028b01d5c313%244c406060%24e4c12120%24%40com.br.


Re: Multi return values in single function

2020-01-04 Thread Eduardo Cervantes
I think I understand what you mean but it would be helpful, at least to me,
to see some code and possibly a mock up of your intended UI.

Cheers,
Eduardo
https://eddyizm.github.io/resume/


On Sat, Jan 4, 2020, 06:38 nrupesh08  wrote:

> hi,
> I design cms design on the company profile website.
> 5 pages on the website:
>  index, about, services, projects, contact.
>
> the problem is,
> to display easily DB to frontend expect index page. because. all mixed
> retrieve DB. just main or sample of the display index page. like., about,
> service, project and contact.
>
> like,.: def index(request):
> content = {}
> return render(request, 'index.html', {})
>
> I want, like return values
>  def index(request):
> content = {
>about, services(4 services displayed), projects(2 project
> displayed), contact
> }
>  return render(request, 'index.html', {})
>
>
> but, *how to so many return values in one function?*
>
> please help 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALZhWrdov5hoDrz6OzUXW1bF9QpS5kPuM7ZjXCzAdbCwsQxtbQ%40mail.gmail.com.


Re: How to create form to show user input and return results from DB

2020-01-04 Thread Eduardo Cervantes
1. No. The data for 2000,2010 could be in one table
2.. you can create a view that accepts get and post. Get when the user
loads the page initially to fill it out  and Post when they submit it. This
should take them to a new page with the results or a refreshed view if you
are using a JavaScript library.
3. Yes. You need to pass the input of the form as a search parameter to the
post view code.
4.dont worry, this is a small hump and you get over it.

Btw - you should clean up your repo, it has a ton of stuff, ie your whole
virtual env with binaries and executables in it that should never really be
checked in. It could use a requirement.txt and a .gitignore file as well.

Cheers,
Eduardo
https://eddyizm.github.io/resume/


On Fri, Jan 3, 2020, 15:11 nmaxbe...@gmail.com  wrote:

> Hi,
>
> I am creating a website that lists my states congressional districts based
> on the US census (i.e. 2000, 2010 and ultimately to update when the 2020
> survey is completed).  The entire exercise is to track how the
> representation could possibly change based on the US census.
>
> So far, I have a mock-up for two user inputs: one for 2000 and one for
> 2010 entering their zip codes on the homepage. The user is prompted to
> input their zip code (for each census year) in order to see their
> representative for 2000 and 2010 (basically pulling from a db to show the
> results) and the results show on the results page (new tab).
>
> My confusion:
>
>1. Should I combine the DB's to "respond" to the users input or keep
>DB's (2000, 2010) separate?
>2. I understand how to create models and I understand how to create
>views, but I am confused on creating the form (specifically "GET" vs 
> "POST".
>3. Is POST what the user inputs? If so, how do I "search through the
>existing DB"?
>4. I have reviewed the form docs within Django but still am lost.
>Please help.
>
> As you suspected, I am new to Django but want to "get over this hump".  I
> feel I am reaching too far and the answer is in front of my face.  My
> github is: https://github.com/NinaMaxberry/Cornerstone-Project. Once you
> visit, you will see, I've tried a lot of options.
>
> Any help would be greatly appreciated.
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f1995c7-6e6c-4147-b53b-10373c7b4b31%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALZhWrcM--2KKOfTJQkSXXWRz%2BHvtnD2Rcu4vis4KM-xuBdjiA%40mail.gmail.com.


Re: Multi return values in single function

2020-01-04 Thread N Rupesh
I think , you don't understand my problem

On Sat, Jan 4, 2020, 8:23 PM Muhammed Rafi A 
wrote:

> return render(request, 'index.html', content)
>
>
> On Sat, Jan 4, 2020, 8:09 PM nrupesh08  wrote:
>
>> hi,
>> I design cms design on the company profile website.
>> 5 pages on the website:
>>  index, about, services, projects, contact.
>>
>> the problem is,
>> to display easily DB to frontend expect index page. because. all mixed
>> retrieve DB. just main or sample of the display index page. like., about,
>> service, project and contact.
>>
>> like,.: def index(request):
>> content = {}
>> return render(request, 'index.html', {})
>>
>> I want, like return values
>>  def index(request):
>> content = {
>>about, services(4 services displayed), projects(2 project
>> displayed), contact
>> }
>>  return render(request, 'index.html', {})
>>
>>
>> but, *how to so many return values in one function?*
>>
>> please help 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADwyzwq8F6fgF6ysehw66c_EZLnvS7Erkd5F%2BQusPVCRqB9fQg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJTpUzk--OPeoCRVQStSvmKeEOfPQn12J5fzzoSqU28bpZEvqw%40mail.gmail.com.


Re: Multi return values in single function

2020-01-04 Thread Eduardo Cervantes
Sorry bud,
Your english is a little rough around the edges so that be part of the
barrier.
good luck.

https://eddyizm.github.io/resume/




On Sat, Jan 4, 2020 at 8:02 AM N Rupesh  wrote:

> I think , you don't understand my problem
>
> On Sat, Jan 4, 2020, 8:23 PM Muhammed Rafi A 
> wrote:
>
>> return render(request, 'index.html', content)
>>
>>
>> On Sat, Jan 4, 2020, 8:09 PM nrupesh08  wrote:
>>
>>> hi,
>>> I design cms design on the company profile website.
>>> 5 pages on the website:
>>>  index, about, services, projects, contact.
>>>
>>> the problem is,
>>> to display easily DB to frontend expect index page. because. all mixed
>>> retrieve DB. just main or sample of the display index page. like., about,
>>> service, project and contact.
>>>
>>> like,.: def index(request):
>>> content = {}
>>> return render(request, 'index.html', {})
>>>
>>> I want, like return values
>>>  def index(request):
>>> content = {
>>>about, services(4 services displayed), projects(2 project
>>> displayed), contact
>>> }
>>>  return render(request, 'index.html', {})
>>>
>>>
>>> but, *how to so many return values in one function?*
>>>
>>> please help 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CADwyzwq8F6fgF6ysehw66c_EZLnvS7Erkd5F%2BQusPVCRqB9fQg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJTpUzk--OPeoCRVQStSvmKeEOfPQn12J5fzzoSqU28bpZEvqw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALZhWrc%3DK_tnTtiRUd-7XwsXu6zGM0aD-VU7%3Dv%3DVK%2BhOeni0bg%40mail.gmail.com.


Re: Multi return values in single function

2020-01-04 Thread Motaz Hejaze
# show us your models.py
def index(request):
content = {
   about:'about',
   serv1:'serv1',
   serv2:'serv2',
   serv3:'serv3',
   serv4:'serv4',
   project1:'project1',
   project2:'project2',
   contact:'contact',
}
 return render(request, 'index.html', content)

On Sat, Jan 4, 2020 at 6:18 PM Eduardo Cervantes  wrote:

> Sorry bud,
> Your english is a little rough around the edges so that be part of the
> barrier.
> good luck.
>
> https://eddyizm.github.io/resume/
>
>
>
>
> On Sat, Jan 4, 2020 at 8:02 AM N Rupesh  wrote:
>
>> I think , you don't understand my problem
>>
>> On Sat, Jan 4, 2020, 8:23 PM Muhammed Rafi A 
>> wrote:
>>
>>> return render(request, 'index.html', content)
>>>
>>>
>>> On Sat, Jan 4, 2020, 8:09 PM nrupesh08  wrote:
>>>
 hi,
 I design cms design on the company profile website.
 5 pages on the website:
  index, about, services, projects, contact.

 the problem is,
 to display easily DB to frontend expect index page. because. all mixed
 retrieve DB. just main or sample of the display index page. like., about,
 service, project and contact.

 like,.: def index(request):
 content = {}
 return render(request, 'index.html', {})

 I want, like return values
  def index(request):
 content = {
about, services(4 services displayed), projects(2 project
 displayed), contact
 }
  return render(request, 'index.html', {})


 but, *how to so many return values in one function?*

 please help 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com
 
 .

>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CADwyzwq8F6fgF6ysehw66c_EZLnvS7Erkd5F%2BQusPVCRqB9fQg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJTpUzk--OPeoCRVQStSvmKeEOfPQn12J5fzzoSqU28bpZEvqw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALZhWrc%3DK_tnTtiRUd-7XwsXu6zGM0aD-VU7%3Dv%3DVK%2BhOeni0bg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-es%3D_Nb6_UkVpWkj-shiVjhgwusvhJN12O1uoF3nN2akw%40mail.gmail.com.


Hey , happy new year guys .

2020-01-04 Thread Evil Kunt
Hi guys ,

Its evil ! Evil kunt . Sorry for the name .

Happy new year to all , its bit late , sorry was on a trip .

I have been with python since 2009 , been with django kinda 2016 .

I also used cherrypy but big fan of django .

I also use DRF , Falcon and HUG as rest ,SQLAlchemy orm .

I work basically in the field of ANN , AI . But as a old habitat of web
apps , i like to be back to it all the time.

Its a good community , i am also a member of PSF (Python software
Foundation)

I have a daughter whom i call 'PY' .
Its because i love python and every year i learn new language , like now i
am into RUST .

Hope to be active but couldn't promise as office work bit much now .

Kr,
Kunt.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABCeVgxda-o7hbbtT3Sqomo5mh-%2BFunRyG4ZJhKKLS7_HGhR8A%40mail.gmail.com.


Re: Multi return values in single function

2020-01-04 Thread Evil Kunt
Hey ,

content is a dictionary , use key value pair and return it . Use if endif
or block in template , to render it accordingly .

I couldn't get ur question properly , but i can help u , if necessary we
can have any webex or skype .

On 4 Jan 2020 20:09, "nrupesh08"  wrote:

hi,
I design cms design on the company profile website.
5 pages on the website:
 index, about, services, projects, contact.

the problem is,
to display easily DB to frontend expect index page. because. all mixed
retrieve DB. just main or sample of the display index page. like., about,
service, project and contact.

like,.: def index(request):
content = {}
return render(request, 'index.html', {})

I want, like return values
 def index(request):
content = {
   about, services(4 services displayed), projects(2 project
displayed), contact
}
 return render(request, 'index.html', {})


but, *how to so many return values in one function?*

please help 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 view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/915fc8da-b03f-4404-8007-803e520f68fe%40googlegroups.com

.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABCeVgw2VQ3YBSydAb3WJFF%2B--8RMhO-yhXdPb24La7Cg3TMwQ%40mail.gmail.com.


Re: Hello Everbody! Happy New Year

2020-01-04 Thread Evil Kunt
Hey ,

For rest , if you like i can help you with i use DRF , Falcon and HUG
mostly .

For user auth , i use django standard auth library .

Regards ,
Kunt.

On 4 Jan 2020 20:33, "Desh Deepak"  wrote:

Wish you the same,

My name is Desh Deepak from New Delhi India.


Can you help me about  django Custom user authentication and  restAPI.

Thanks in advance

Thanks & Regards
Desh Deepak
+91 7011101001




On Sat, 4 Jan 2020, 20:12 Murilo A. Gigliotti, 
wrote:

> Hello All,
>
>
>
> Thanks for the opportunity to stay here in the group.
>
> Let me introduce myself.
>
> My name is Murilo Gigliotti, I am from Brazil and I live in São Paulo city.
>
> I've been studying *Python + Django* since the beginning of 2019.
>
> Now I am able to help the community with my work.
>
> I have a IT company named Gigliotti Tech - Knowlegde Technologies
> (Gigliotti Tech - Tecnologias do Conhecimento).
>
> The company's web site is www.gigliottitech.com.br
>
> Anyway, It's a very pleasure to me to participate of this group.
>
> If you want to talk about projects, please send an email to
> mur...@gigliottitech.com.br
>
>
>
> PS: Next month (February 12 to 22) I will be in New York, so let me know
> if I could meet anyone there.
>
>
>
> See you
>
> Best regards.
>
>
>
> [image: ASSINATURA DE EMAIL tech]
>
> *[image: Odoo icone2] Odoo Business Partner*
>
> Mais informações visite http://www.gigliottitech.com.br/
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/027601d5c30d%2418ca4d00%244a5ee700%24%40com.br
> 
> .
>
-- 
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 view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/CAJ0m4xjViq7tRxSHjOiAnrAuqGVZLR6ne%2B%3DqoqM09cOoR-1tcQ%
40mail.gmail.com

.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABCeVgxGwLt7E%3D3eBj2J7UnhxbXHZWvUKx4rGzriWmF9sS6TMg%40mail.gmail.com.


Re: Hello Everbody! Happy New Year

2020-01-04 Thread Desh Deepak
Can you explain details.
Some example of code...!!


Thanks in advance

On Sun, 5 Jan 2020, 00:03 Evil Kunt,  wrote:

> Hey ,
>
> For rest , if you like i can help you with i use DRF , Falcon and HUG
> mostly .
>
> For user auth , i use django standard auth library .
>
> Regards ,
> Kunt.
>
> On 4 Jan 2020 20:33, "Desh Deepak"  wrote:
>
> Wish you the same,
>
> My name is Desh Deepak from New Delhi India.
>
>
> Can you help me about  django Custom user authentication and  restAPI.
>
> Thanks in advance
>
> Thanks & Regards
> Desh Deepak
> +91 7011101001
>
>
>
>
> On Sat, 4 Jan 2020, 20:12 Murilo A. Gigliotti, <
> mur...@gigliottitech.com.br> wrote:
>
>> Hello All,
>>
>>
>>
>> Thanks for the opportunity to stay here in the group.
>>
>> Let me introduce myself.
>>
>> My name is Murilo Gigliotti, I am from Brazil and I live in São Paulo
>> city.
>>
>> I've been studying *Python + Django* since the beginning of 2019.
>>
>> Now I am able to help the community with my work.
>>
>> I have a IT company named Gigliotti Tech - Knowlegde Technologies
>> (Gigliotti Tech - Tecnologias do Conhecimento).
>>
>> The company's web site is www.gigliottitech.com.br
>>
>> Anyway, It's a very pleasure to me to participate of this group.
>>
>> If you want to talk about projects, please send an email to
>> mur...@gigliottitech.com.br
>>
>>
>>
>> PS: Next month (February 12 to 22) I will be in New York, so let me know
>> if I could meet anyone there.
>>
>>
>>
>> See you
>>
>> Best regards.
>>
>>
>>
>> [image: ASSINATURA DE EMAIL tech]
>>
>> *[image: Odoo icone2] Odoo Business Partner*
>>
>> Mais informações visite http://www.gigliottitech.com.br/
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/027601d5c30d%2418ca4d00%244a5ee700%24%40com.br
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJ0m4xjViq7tRxSHjOiAnrAuqGVZLR6ne%2B%3DqoqM09cOoR-1tcQ%40mail.gmail.com
> 
> .
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABCeVgxGwLt7E%3D3eBj2J7UnhxbXHZWvUKx4rGzriWmF9sS6TMg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ0m4xip-b5EgkJBXJ8vNpF2M5gS34mWEVyxsf--feLYLzNoYw%40mail.gmail.com.


Re: Multi return values in single function

2020-01-04 Thread V.K. Vanama
As per the instructions provided in the Django Documentation 3.0, you are 
restricted to get or generate only a single return value to each function 
defined in views.py. *Instead*, as you stated, the* solution to your issue* 
is that *creating hyperlinks in which the particular portion of the webpage 
or website will be redirected to. By specifying explicitly that in your 
case, "index.html" as the base to all other html files till you decide that 
your Django Project Creation is Succeeded.*
I hope you understand.

I answered your question based on the title and issue posted by you. If you 
are familiar with my description, its cool. Else, better to upload an image 
containing the clear picture of communication conversations between the 
urls which depends on your issue/requirement.

On Saturday, January 4, 2020 at 8:09:52 PM UTC+5:30, nrupesh08 wrote:
>
> hi,
> I design cms design on the company profile website.
> 5 pages on the website:
>  index, about, services, projects, contact.
>
> the problem is, 
> to display easily DB to frontend expect index page. because. all mixed 
> retrieve DB. just main or sample of the display index page. like., about, 
> service, project and contact. 
>
> like,.: def index(request):
> content = {}
> return render(request, 'index.html', {})
>
> I want, like return values 
>  def index(request):
> content = {
>about, services(4 services displayed), projects(2 project 
> displayed), contact  
> }
>  return render(request, 'index.html', {})
>
>
> but, *how to so many return values in one function?*
>
> please help 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0996f7f3-999e-45b0-b3cb-eb51b15be000%40googlegroups.com.


Re: Tweak admin widget - FilteredSelectMultiple

2020-01-04 Thread Mike Dewhirst

On 4/01/2020 9:03 pm, Integr@te System wrote:

Hi Mike,

As we look at selected_choice result from iterating v over value (line 
428), option_value base on choice(line 438).

so we can limit input parameter of value variable from this def().


selected_choices appear in the selected box on screen and choices appear 
in the available choices box.


I can see how to tweak either of those if the method was my own. But it 
is an Admin method which interfaces with javascript to provide the user 
interface for making those selections.


I think my original question was too brief.

I'm thinking now I should be using my own version of AutocompleteMixin 
somehow and use formfield_for_manytomany when db_field == "groups" in my 
admin.py to get access to it.


formfield_for_manytomany calls the AutocompleteSelectMultiple class 
which inherits AutocompleteMixin which has the optgroups() method which 
contains selected_choices and choices which are of interest to me.


That said, my question really is "Huh! How do I do that?"

Maybe I'll do some experiments

Thanks in advance if you can short-circuit my research

Cheers

Mike




Hope if heplful.



On Sat, Jan 4, 2020, 11:00 Mike Dewhirst > wrote:


In the Admin where user group membership is shown and groups can be
selected from choices derived from auth_groups, I want to control the
available choices.

It seems the place to do so might be in admin/widgets.py in the
AutocompleteMixin.optgroups() method a few lines in where it says ...

 choices = (
 (obj.pk ,
self.choices.field.label_from_instance(obj))
 for obj in
self.choices.queryset.using(self.db).filter(pk__in=selected_choices)
 )

Could a very kind person explain to me how I can hijack this and
remove
a couple of groups from the resulting choices?

My use case is that I want members of the 'admin' group to be able to
assign any group membershipto any other userexcept for a couple of
groups which are too permissive. The excepted groups can only be
assigned by a Superuser.

Many thanks for any hints

Cheers

Mike


-- 
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 view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/52923a2a-cc6c-e335-f5fe-6ec6ab004013%40dewhirst.com.au.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoZ14gH%3D8V1ARk-pnAKNWuVaqG%3D4%3DGSbwO_-0LrP7DFnw%40mail.gmail.com 
.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d999eb28-e2c8-dc26-9d26-31c0cd4ff555%40dewhirst.com.au.


Re: Full Stack Developer (Python/Django) position requirement for US GC/Citizen/Can Citizen

2020-01-04 Thread Alfredo Sumague
I'm interested,

Thanks,
Alfredo Sumague

On Fri, Jan 3, 2020 at 9:35 AM Yash Garg  wrote:

> For a large multi billion dollar Publishing house in New York, client
> needs a Full Stack Django Developer with 3+ years of solid Python/Django
> experience
>
> Scope:
>
>- Code refinement/linting/unit testing
>- Django application development
>- Data ingestion, data transforms
>- API development
>- ETL scripting
>- Quality Assurance and User Testing (limited; as applicable)
>
> Skills:
>
>- Cloud Platform experience (Google Cloud Platform preferred, but not
>required)
>- Experience implementing CI/CD in an agile workflow; release
>management experience
>- Python  (required)
>- Requests, Django, Pylint, Pytest, automated documentation (Sphinx)
>   - SQL
>- JavaScript, CSS
>- JS front-end frameworks (Angular, React, etc. )
>- Jira
>- Jenkins
>- Git/Github
>- Some data science/analytics preferred (Pandas, Numpy, etc.)
>
> This position is based out of New York. Only US Citizens. Green Card or
> Canadian Citizens (eligible for TN Visa need apply)
>
> **
> We also have additional  Indian openings with same skillset to be based
> out of Ahmedabad office provided they can join immediately.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ca23cf71-2afa-490a-b9bc-366f335cf53d%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGF6mrTUUf%2BXWOfZkwGRO%2BwfH4Xa3rgH9FMzHwZ3a_Tt20BoZg%40mail.gmail.com.


How to configure HTML Form Labels as Dictionary Keys that are defined in forms.py through views.py?

2020-01-04 Thread V.K. Vanama
Kindly respond me depends on the information provided in the attachment.
Thanks and Regards
V.K. Vanama

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1f51d69b-6d2d-4604-abc7-5036995dce45%40googlegroups.com.
Issue: TypeError: __init__() got an unexpected keyword argument 'required'

Django Project Name: DICTIONARY_FORMS
Application Name: App_01
Python Interpreter Version: 3.8.1
Django Version: 3.0.2

Python & Django Environment: Virtual Environment
Database Client Version: MySQL Client 1.4.6

1. How to configure HTML Form Labels as Dictionary Keys that are defined in 
forms.py through views.py?
2. How to assign the end-user responses provided in the HTML Form Fields into 
the respective Dictionary Values in forms.py?
3. How to control the form defined in the forms.py through views.py in this 
particular regard?
4. Ultimately, how to store them in my database after form validation, but as 
of now i did not customize any validations so forth?

Note: Upto now, i did not define any models in my models.py, because of the 
above raised issue.

# Sample Code of My requirement is as follows:-
# forms.py
from django import forms
class MyForm(forms.Form):
member_1 = {'key_1': forms.CharField(max_length=10, required=True),
'key_2': {'A': forms.CharField(max_length=10, required=True), 'B': 
forms.CharField(max_length=10, required=True)},
'key_3': forms.IntegerField(required=True)}
# forms.py ended

# views.py
from django.shortcuts import render
from django.http import HttpResponseRedirect
from .forms import MyForm

# Configuring MyForm in forms.py as HTML Form to display on the User Interface.
def form_view():
if request.POST == True:
form = MyForm(request.POST)
form.save(commit=True)
return HttpResponseRedirect('form/')
form = MyForm()
return render(request, 'form1.html', {'form': form})
# views.py ended


{% extends base.html %}


{% block content %}
{% block form %}
{% csrf_token %}
{{ form.as_div }}
{% endblock %}
{% endblock %}


# urls.py
from . import views
# extending the standard urlpatterns generated by Django with the following:-
urlpatterns = [path('form1', views.form_view), ]
# urls.py ended

# models.py
# yet, I doesn't write code to store the values entered by the end-user/client.
# models.py ended


Re: Tweak admin widget - FilteredSelectMultiple

2020-01-04 Thread Mike Dewhirst

On 5/01/2020 11:42 am, Mike Dewhirst wrote:

On 4/01/2020 9:03 pm, Integr@te System wrote:

Hi Mike,

As we look at selected_choice result from iterating v over value 
(line 428), option_value base on choice(line 438).

so we can limit input parameter of value variable from this def().


selected_choices appear in the selected box on screen and choices 
appear in the available choices box.


I can see how to tweak either of those if the method was my own. But 
it is an Admin method which interfaces with javascript to provide the 
user interface for making those selections.


I think my original question was too brief.

I'm thinking now I should be using my own version of AutocompleteMixin 
somehow and use formfield_for_manytomany when db_field == "groups" in 
my admin.py to get access to it.


formfield_for_manytomany calls the AutocompleteSelectMultiple class 
which inherits AutocompleteMixin which has the optgroups() method 
which contains selected_choices and choices which are of interest to me.


Turns out the data I want to manipulate is encapsulated in widgets.py 
FilteredSelectMultiple() where it returns context. That is called 
directly from formfield_for_manytomany() so all I need to do is override 
that in admin.py and tweak the context.


Thanks all who responded

Cheers

Mike



That said, my question really is "Huh! How do I do that?"

Maybe I'll do some experiments

Thanks in advance if you can short-circuit my research

Cheers

Mike




Hope if heplful.



On Sat, Jan 4, 2020, 11:00 Mike Dewhirst > wrote:


    In the Admin where user group membership is shown and groups can be
    selected from choices derived from auth_groups, I want to control 
the

    available choices.

    It seems the place to do so might be in admin/widgets.py in the
    AutocompleteMixin.optgroups() method a few lines in where it says 
...


     choices = (
     (obj.pk ,
    self.choices.field.label_from_instance(obj))
     for obj in
self.choices.queryset.using(self.db).filter(pk__in=selected_choices)
     )

    Could a very kind person explain to me how I can hijack this and
    remove
    a couple of groups from the resulting choices?

    My use case is that I want members of the 'admin' group to be 
able to

    assign any group membershipto any other userexcept for a couple of
    groups which are too permissive. The excepted groups can only be
    assigned by a Superuser.

    Many thanks for any hints

    Cheers

    Mike


    --     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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/52923a2a-cc6c-e335-f5fe-6ec6ab004013%40dewhirst.com.au.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoZ14gH%3D8V1ARk-pnAKNWuVaqG%3D4%3DGSbwO_-0LrP7DFnw%40mail.gmail.com 
. 





--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9dfed895-b926-0ef1-3945-000c79b43b40%40dewhirst.com.au.