Answer the question
In order to leave comments, you need to log in
Is there a table plugin (price list) for Django-CMS?
We need a plugin with which you can show tables in Django-CMS.
You need something with which you can organize the management of the price list. What would be possible to do groups, so that it would be possible to display a separate group on a single page and display the entire price list on one page with all groups. There is another nuance - in some price lists, how many columns with the price (for example, "retail, from 10 pcs., From 100 pcs.)
Answer the question
In order to leave comments, you need to log in
You can do this (pulled from your project):
#models.py
class PageImage(models.Model):
title = models.CharField(max_length=200, blank=False, verbose_name='Заголовок')
text = models.TextField(max_length=1000, blank=True, verbose_name='Текст')
class PriceField(models.Model):
st = (
('ST', 'шт.'),
('SE', 'ед.'),
)
property = models.ForeignKey(Price, related_name='fields')
name = models.CharField(max_length=1000, blank=True, verbose_name='Название')
kolv = models.DecimalField(max_digits=100, decimal_places=0, default='0', verbose_name='Количество')
price = models.DecimalField(max_digits=100, decimal_places=2, default='0', verbose_name='Цена за шт.')
#admin.py
class PriceFieldsInline(admin.TabularInline):
model = PageImage
extra = 3
class PriceAdmin(admin.ModelAdmin):
inlines = [PriceFieldsInline, ]
admin.site.register(Page, PriceAdmin)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question