#
url(r'^$', views.BookList, name='BookList'),
url(r'^category/(?P<category_slug>[-\w]+)/$', views.BookList, name='BookListByCategory'),
url(r'^book/(?P<id>\d+)/(?P<slug>[-\w]+)/$', views.BookDetail, name='BookDetail'),
url(r'^contacts/$', views.ContactsPage, name='ContactsPage'),
class Slider(models.Model):
name = models.CharField(max_length=200, verbose_name='Название')
class News(models.Model):
in_slider = model.ForeignKey(Slider)
class Page(models.Model):
in_slider = model.ForeignKey(Slider)
class News(models.Model):
in_slider = model.BooleanField()
class Page(models.Model):
in_slider = model.BooleanField()
In [2]: from decimal import Decimal
In [3]: Decimal(10.11) * Decimal(1 - 20/100)
Out[3]: Decimal('8.087999999999999994226840272')