Re: Trying to filter out choices in a form based on the logged in user.

2019-02-09 Thread Ricardo Cataldi
You van create this property on your model, andam the init would bem applied to your form Em sáb, 9 de fev de 2019 13:15, GavinB841 Hi Ricardo, > > Really appreciate your reply, I am struggling to understand where I would > create this property as I am quite new to Django and haven't worked with

Re: Trying to filter out choices in a form based on the logged in user.

2019-02-09 Thread GavinB841
Hi Ricardo, Really appreciate your reply, I am struggling to understand where I would create this property as I am quite new to Django and haven't worked with these before. Is it included in the model/view/form and under which model for the club, user or team. Thanks for your help. Gavin

RE: Trying to filter out choices in a form based on the logged in user.

2019-02-09 Thread Ricardo Cataldi
Hello there Galvin, You can create properties on the users and filter the queryset conditioning to the user. It depends on how many categories of user you have and how these users are supposed to be filtered by those teams. For example, if you have a spatial selection based on user

Trying to filter out choices in a form based on the logged in user.

2019-02-09 Thread GavinB841
Hi all, If anyone could help or point me in the direction of some documentation for the below problem I am having I would really appreciate it. Just to explain quickly: 1. I have a model called "Team" which contains a foreign key to another model called "Club" 2. The "Club" model