On Thu, Mar 3, 2016 at 10:58 PM, Joshua Chan
<
joshua.be...@gmail.com> wrote:
> First off, I am new to both django and python.
>
> I am extending an existing app. We have several admin.py files
>
> They all look like this:
>
> #!/usr/bin/env python
> # coding: utf-8
> from guardian.admin import GuardedModelAdmin
> from django.contrib import admin
>
>
> from devices import models
>
>
> class SomeModelAdmin(GuardedModelAdmin):
> pass
>
>
> admin.site.register(models.SomeModel, SomeModelAdmin)
>
> Everything has been working.
>
> I added my classes
>
> #!/usr/bin/env python
> # coding: utf-8
> from guardian.admin import GuardedModelAdmin
>
>
> from django.contrib import admin
> from common import models
>
>
> class MyModel1Admin(GuardedModelAdmin):
> pass
>
>
> admin.site.register(models.Model, MyModel1Admin)
>
>
> class MyModel2Admin(GuardedModelAdmin):
> pass
>
>
> admin.site.register(models.Model2, MyModel2Admin)
>
> This also works fine locally, but when we deploy it, it blows up on the
> import:
> I am running 2.7.10 locally. The failing machine is running 2.7.6. I'm not
> sure how to switch my env around, but why would other admin.py files import
> guardian.admin correctly?
Is there a module adjacent to the failing admin.py named guardian?
Cheers
Tom