google-code-export / student-worker-relational-database

Automatically exported from code.google.com/p/student-worker-relational-database
1 stars 1 forks source link

Benchmark grade should not be displayed when not installed #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Go to /admin/sis/schoolyear/XX there is a checkbox for benchmark grade. This 
should not be shown when benchmark grade is not installed. Having it in the 
admin's exclude would be fine, I don't mind it existing in the database unseen.

Original issue reported on code.google.com by dmbs...@gmail.com on 27 Nov 2011 at 6:15

GoogleCodeExporter commented 9 years ago
How does one add/remove an attribute from a model based on what
applications are installed?

On Sun, Nov 27, 2011 at 1:16 PM, <
student-worker-relational-database@googlecode.com> wrote:

Original comment by jmil...@cristoreyny.org on 27 Nov 2011 at 6:43

GoogleCodeExporter commented 9 years ago
See how SSN is excluded based on permissions

def get_form(self, request, obj=None, **kwargs):
        form = super(StudentAdmin,self).get_form(request,obj,**kwargs)
        if not request.user.has_perm('sis.view_ssn_student'):
            self.exclude = ("ssn",)
        return form

for checking if install
if 'ecwsp.foo' in settings.INSTALLED_APPS

Original comment by dmbs...@gmail.com on 27 Nov 2011 at 6:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 38a7a758bd5f.

Original comment by jmil...@cristoreyny.org on 28 Nov 2011 at 2:51