Maciej Wiśniowski avatar Maciej Wiśniowski committed 5093b5a Draft

formatting

Comments (0)

Files changed (1)

lfs_carousel/views.py

         return HttpResponse(result)
 
     def move_item(self, request, id):
-        """Moves the items with passed id up or down.
+        """ Moves the items with passed id up or down.
 
-        **Parameters:**
+            **Parameters:**
+                id
+                    The id of the item which should be edited.
 
-            id
-                The id of the item which should be edited.
+            **Query String:**
+                direction
+                    The direction in which the item should be moved. One of 0 (up)
+                    or 1 (down).
 
-        **Query String:**
-
-            direction
-                The direction in which the item should be moved. One of 0 (up)
-                or 1 (down).
-
-        **Permission:**
-
-            edit (of the belonging content object)
+            **Permission:**
+                edit (of the belonging content object)
         """
         item = self.get_item_cls().objects.get(pk=id)
         obj = item.content
 
     # copied from contrib.admin.sites
     def has_permission(self, request):
-            """
-            Returns True if the given HttpRequest has permission to view
+        """ Returns True if the given HttpRequest has permission to view
             *at least one* page in the admin site.
-            """
-            return request.user.is_active and request.user.has_perm('core.manage_shop')
+        """
+        return request.user.is_active and request.user.has_perm('core.manage_shop')
 
     def carousel_view(self, view, cacheable=False):
-        """
-        Decorator to create an carousel view attached to this ``LFSCarousel``. This
-        wraps the view and provides permission checking by calling
-        ``self.has_permission``.
-
+        """ Decorator to create an carousel view attached to this ``LFSCarousel``. This
+            wraps the view and provides permission checking by calling
+            ``self.has_permission``.
         """
         def inner(request, *args, **kwargs):
             if not self.has_permission(request):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.