Commits

Artur Barseghyan committed d430248 Draft

minor version up

  • Participants
  • Parent commits 9cd8686
  • Tags 0.4.1

Comments (0)

Files changed (5)

File CHANGELOG.rst

 =====================================
 Release history
 =====================================
+0.4.1
+-------------------------------------
+2013-11-27
+
+- Fixed issue with fieldset classes being stripped out.
+
 0.4
 -------------------------------------
-Release date
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2013-10-10
 
-Summary
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - Selenium tests added.
 
 0.3
 -------------------------------------
-Release date
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2013-09-15
 
-Summary
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - Added ability to protect ModelAdmin fields from users without appropriate permissions.
 
 0.2
 -------------------------------------
-Release date
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2013-09-10
 
-Summary
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - Python 2.6.8 and 3.3 support addeded.
 
 0.1
 -------------------------------------
-Release date
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2013-06-17
 
-Summary
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - Initial.
+Credits
+======================
+Authors
+----------------------
+- Artur Barseghyan
+
+Contributors
+----------------------
+- guybowden: fixing the issue with fieldset classes being stripped out (commit
+  01413de9999e67e521b66ad1c6c88d4dd2d6a376).

File docs/conf.py

 # built documents.
 #
 # The short X.Y version.
-version = '0.4'
+version = '0.4.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.4'
+release = '0.4.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 except:
     readme = ''
 
-version = '0.4'
+version = '0.4.1'
 
 setup(
     name = 'django-werewolf',

File src/werewolf/admin.py

         for your own needs, make sure the it also reflects the django-werewolf concepts.
         """
         fieldsets = super(WerewolfBaseAdmin, self).get_fieldsets(request, obj=None)
-        
+
         if not self.werewolf_protected_fields:
             return fieldsets
 
 
         for fieldset_label, fieldset in fieldsets:
             fields = list(fieldset['fields'])
-
             for field_name, required_permission in self.werewolf_protected_fields:
                 # Cleaning the field that has been already excluded from form (in ``get_form``).
                 if not request.user.has_perm('{0}.{1}'.format(self.model._meta.app_label, required_permission)):
                     except:
                         pass
 
-            cleaned_fieldsets.append((fieldset_label, {'fields': fields}))
+            fieldset_attributes = {
+                'fields': fields,
+                'classes': fieldset.get('classes', list())
+            }
+            cleaned_fieldsets.append((fieldset_label, fieldset_attributes))
 
         return cleaned_fieldsets