SELECT id, name FROM category WHERE id in (Select parent_category_id FROM category GROUP BY parent_category_id HAVING count(*) <=3)
SELECT category.id, category.name FROM category LEFT JOIN category as ct ON category.id = ct.parent_category_id WHERE ct.parent_category_id is NUll AND category.parent_category_id <> 0
И подскажите, если можете, какие-нибудь ресурсы по 4-му или 3-му бутстрапу.
{
skip: %Пропущенные страницы% * %элементов на страницу%,
limit: %элементов на страницу%,
filers: [ваши фильтры]
}
Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.
class Category(models.Model):
parent = models.ForeignKey('self', null=True)
title = models.CharField(...)
class Product(models.Model):
title = models.CharField(...)
parent = models.ManyToManyField('self', null=True)
# in class Category
is_best = models.Boolean(default=False)
<a href="viber://chat?number=ххххххххх">Viber</a>
<a href="viber://add?number=ххххххххх">Viber</a>
viber://tel:xxxxxx
и viber://chat:xxxxxx
viber://calls
(открывает таб звонков) и viber://chats
(открывает таб чатов)viber://forward?text=Hello
(на iOS открывает экран выбора адресата, на Андроиде не проверял) - отсюда.