Re: Accessing request object

2014-09-22 Thread Salvatore DI DIO
o you can consider adding request parameter explicitly to your > __init__ method and then passing it to `restrictQuery`. > > PS. restrictQuery should be named restrict_query according to python > style guide. > > воскресенье, 21 сентября 2014 г., 15:38:23 UTC+4 пользователь Sa

Re: Accessing request object

2014-09-22 Thread Salvatore DI DIO
Excuse me Collin, I don't understang what you are meaning ... Le lundi 22 septembre 2014 17:46:41 UTC+2, Collin Anderson a écrit : > > Can you attach the request to `form.request`? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Testting field.label_tag

2014-09-22 Thread Salvatore DI DIO
ers > > > On Monday, September 22, 2014 10:51:59 AM UTC+2, Salvatore DI DIO wrote: >> >> Hello, >> >> I woulk like to test field.label_tag in the fieldset.html template >> >> For example I want to do: >> >> {% if field.label_tag != 'Tags' %} &

Re: Testting field.label_tag

2014-09-22 Thread Salvatore DI DIO
Cheers > > On 22 Sep 2014, at 10:51, Salvatore DI DIO <salvato...@gmail.com > > wrote: > > Hello, > > I woulk like to test field.label_tag in the fieldset.html template > > For example I want to do: > > {% if field.label_tag != 'Tags' %} > {{ f

Testting field.label_tag

2014-09-22 Thread Salvatore DI DIO
Hello, I woulk like to test field.label_tag in the fieldset.html template For example I want to do: {% if field.label_tag != 'Tags' %} {{ field.label_tag }} {% endif %} But that seems to not work Thanks for your suggestions -- You received this message because you are subscribed to

Solution : filtering listbox per user in 'admin add' form

2014-09-21 Thread Salvatore DI DIO
This post follows my previous on filtering a listbox in 'admin add form' per user This is ceratinly a hack but It works for now, If you have a better solution, I would be glad to read it. In order to access the request object in '*/contrib/admin/helpers.py*' I modified the

Re: Custom change_form.html

2014-09-21 Thread Salvatore DI DIO
; > > > The if is not necessary, it is just to show you that you have the user > object into the request. > > > > On Sunday, September 21, 2014 8:33:20 AM UTC-3, Salvatore DI DIO wrote: >> >> Thank you Collin, >> >> In fact I have not really a

Accessing request object

2014-09-21 Thread Salvatore DI DIO
Hello, Is it possible to access request object in 'helpers.py' file ? Ihave tried 'crequest' (from crequest.middleware import CrequestMiddleware) without luck. class AdminField(object): def __init__(self, form, field, is_first): self.field = form[field] # A django.forms.BoundField

Re: Custom change_form.html

2014-09-21 Thread Salvatore DI DIO
Thank you Collin, In fact I have not really access to the list. II would like to flter a list wich is already rendered as a listbox widget (fiedset.html) Le samedi 20 septembre 2014 01:33:42 UTC+2, Collin Anderson a écrit : > > if nothing else: > > {% for item in list %}{% if item.user = user

Custom change_form.html

2014-09-19 Thread Salvatore DI DIO
Hello, *To follow my preceding question, on customize admin view, (*Helton Alves gave me a nice response). I am wondering how to filter a list in change_form.html admin form, according to a partuculiar user ? Thank you for your help Regards -- You received this message because you are

Re: Customise admin view

2014-09-18 Thread Salvatore DI DIO
.user) > > > 2014-09-18 14:17 GMT+01:00 Salvatore DI DIO <salvato...@gmail.com > >: > >> Hy Elton, >> >> In fact each image belongs to an album. >> Let us say I have three album ALB1 ALB2 ALB3 >> >> In the admin form, when I add an image I

Re: Customise admin view

2014-09-18 Thread Salvatore DI DIO
t; 2014-09-18 9:59 GMT+01:00 Salvatore DI DIO <salvato...@gmail.com > >: > >> Hello, >> >> I am following a 'photo application' tutorial : >> http://lightbird.net/dbe/photo.html >> I have created several 'albums' to insert images in. >> &

Customise admin view

2014-09-18 Thread Salvatore DI DIO
Hello, I am following a 'photo application' tutorial : http://lightbird.net/dbe/photo.html I have created several 'albums' to insert images in. I would like those albums beeing displayed in the admin panel according to each user or group Thank your for your help regards -- You received