Re: Problems with ManyToManyFields from Base and Derived Classes

2014-04-04 Thread Alessandro Caruso
I've moved the forms definition into a separated forms.py file (as suggested by a member of the italian group) and it seems to work. I'll do some tests in the next days then post the correct version. Il giorno venerdì 4 aprile 2014 12:36:17 UTC+2, Alessandro Caruso ha scritto: &

Re: Problems with ManyToManyFields from Base and Derived Classes

2014-04-04 Thread Alessandro Caruso
orm, self).__init__(*args, **kwargs) > self.fields['managers'] = > forms.ModelMultipleChoiceField(choices=self.managers, required=False) > self.fields['viewers'] = > forms.ModelMultipleChoiceField(choices=self.viewers, required=False) > > Sor

Re: Problems with ManyToManyFields from Base and Derived Classes

2014-04-03 Thread Alessandro Caruso
Thanks Liam Il giorno giovedì 3 aprile 2014 19:05:28 UTC+2, Liam Thompson ha scritto: > > Hi Alex > > Let me have another look through your code and I'll try to come up with > something useful. > > Liam > > > > > On 03/04/2014 18:20, Alessandro Carus

Re: Problems with ManyToManyFields from Base and Derived Classes

2014-04-03 Thread Alessandro Caruso
I got the traceback (thanks to a middleware which collects it and a send it back to the ajax request even if DEBUG=False) Environment: Request Method: POST Request URL: http://server:8080/assets/edit/videoconference/30 Django Version: 1.4.5 Python Version: 2.7.3 Installed Applications: ('djang

Re: Problems with ManyToManyFields from Base and Derived Classes

2014-04-02 Thread Alessandro Caruso
= ModelMultipleChoiceField(queryset = User.objects.all().order_by( > 'username')) > > from the shell ? > > Liam > > > > > On Wednesday, 2 April 2014 15:12:42 UTC+2, Alessandro Caruso wrote: >> >> Hi all. >> >> >> the code: >> model

Different ManyToManyFields to the User Table cause problem when editing form

2014-04-02 Thread Alessandro Caruso
Hi all, I have a (strange) problem. When trying to edit the VideoconferenceForm (see code later) Django returns an error "Cannot resolve keyword 'videoconference' into field. Choices are:… " It happens only when running the code on Apache (on Django dev server it works without problems, I can't

Problems with ManyToManyFields from Base and Derived Classes

2014-04-02 Thread Alessandro Caruso
Hi all. the code: models.py https://gist.github.com/karuso/9766764 views.py (edit function) https://gist.github.com/karuso/9766806 the problem: When editing a Videoconference record through the VideoconferenceForm, Django returns an error: "Cannot resolve keyword 'videoconference' into field.