from uuid import UUID
class Book(models.Model):
section = models.ForeignKey(Section, related_name="books")
{{ sec.books.count }}
{% load staticfiles %}
<img src="{% static "my_app/myexample.jpg" %}" alt="My image"/>
{{ mymodel.my_image_field.url }}
$GLOBAL_FONT_SIZE: 18px; // this should be with 'px'
@mixin my-font ($font_size, $lineheight_size, $font){
font: #{ $font_size * $GLOBAL_FONT_SIZE }/#{ $lineheight_size * $GLOBAL_FONT_SIZE } $font;
font: #{ $font_size }rem/#{ $lineheight_size }rem $font;
}
.somestyle {
@include my-font(1, 1.5, 'Arial sans-serif');
}
.somestyle {
font: 18px/27px "Arial sans-serif";
font: 1rem/1.5rem "Arial sans-serif";
}