Re: limiting the drop down option of a one-to-one relationship in the admin app. is that possible ?

2017-01-28 Thread Mike08
structor. In this case it says 'NoneType' object does not support item assignment So my question is how can i mark a field as readonly in the form and assign an initial value ? On Saturday, January 28, 2017 at 6:21:34 PM UTC-8, Mike08 wrote: > > I currently have a model th

Re: limiting the drop down option of a one-to-one relationship in the admin app. is that possible ?

2017-01-28 Thread Mike08
I am not sure if i understand this are you suggesting that i return a form instead of a queryset ? -- 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

limiting the drop down option of a one-to-one relationship in the admin app. is that possible ?

2017-01-28 Thread Mike08
I currently have a model that looks like this class modelStudent(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE,null=True, blank=True) school = models.ForeignKey(modelSchool) Now I also have a modelStudentAdmin of the above model which basically filt

result of filter query returning empty because of def __unicode__(self)

2017-01-26 Thread Mike08
Does adding a def __unicode__(self): method into a model affect the queries being returned ? I am currently experiencing a situation in which the presence of def __unicode__(self): in the model is interfering with the results being returned. These two are my models class modelLabTestN

Re: Multiple (limited) Admin feature for each registered user - Best Approach.

2017-01-26 Thread Mike08
to do or (would like to do) is allow a bunch of users the ability to modify certain objects . Something exactly like the admin interface , however limiting the changes they can make to an object.* On Thursday, January 26, 2017 at 1:58:57 PM UTC-8, Mike08 wrote: > > Hello experts first tim

Multiple (limited) Admin feature for each registered user - Best Approach.

2017-01-26 Thread Mike08
Hello experts first time poster here, so I am not sure how to approach this issue. I am trying to restrict admin privileges of users. Let me explain a simple use case and then I could explain my objective. Consider the following example (model code below) there are 3 subjects(Subject Model) in t