Commits

Anonymous committed 3bd945e

Fix mistakes in last commit

  • Participants
  • Parent commits dcb703d

Comments (0)

Files changed (3)

File gnocchi/store/admin.py

     fieldsets = (
         (None, {
             'fields': (
-                ('name', 'sku',)
+                ('name', 'sku',),
                 'catalogue',
                 'short_description',
                 'description',
 
 class CatalogueAdmin(admin.ModelAdmin):
     list_display = ('name',)
-    list_filter = ('site',)
+    list_filter = ('sites',)
     prepopulated_fields = {'slug': ('name',)}
 
 admin.site.register(models.Catalogue, CatalogueAdmin)

File gnocchi/store/models.py

 
     @models.permalink
     def get_absolute_url(self):
-        return ('catalogue-detail', (), {'slug': self.slug})
+        return ('catalogue-detail', (), {'catalogue': self.slug})
 
 class Product(models.Model):
     catalogue = models.ForeignKey('Catalogue')

File gnocchi/store/urls.py

     url(r'^cart/remove/$', CartRemove.as_view(), name='cart-del'),
 
     url(r'^product/(?P<pk>\d+)/$', ProductDetail.as_view(), name='product-detail'),
-    url(r'^(?P<catalogue>[-\w]+/(?P<tags>.*)$', ProductList.as_view(), name='catalogue-detail'),
+    url(r'^(?P<catalogue>[-\w]+)/(?P<tags>.*)$', ProductList.as_view(), name='catalogue-detail'),
 
-    url(r'^$', CatalogueList.as_view()),
+    url(r'^$', CatalogueList.as_view(), name='catalogue-list'),
 )