Skip to content

Commit

Permalink
pep8 and whitespace fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHill committed Sep 5, 2012
1 parent 9e06c69 commit 75004e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cartridge/shop/admin.py
Expand Up @@ -165,12 +165,17 @@ def __init__(self, *args, **kwargs):
adding all model fields when no fieldsets are defined on the
Admin class.
"""

super(ProductAdmin, self).__init__(*args, **kwargs)

# Test that the fieldsets don't differ from ProductAdmin's.
if self.model is not Product and self.fieldsets == ProductAdmin.fieldsets:
if (self.model is not Product and
self.fieldsets == ProductAdmin.fieldsets):

# Make a copy so that we aren't modifying other Admin
# classes' fieldsets.
self.fieldsets = deepcopy(self.fieldsets)

# Insert each field between the publishing fields and nav
# fields. Do so in reverse order to retain the order of
# the model's fields.
Expand Down

0 comments on commit 75004e2

Please sign in to comment.