How to get the first record from the database?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
18 views
As the template to obtain the first record from the database? Now cycle deduce all records


{% for about in aboutText %} {{ about.title }}{% endfor %}

But if I need from the database only the first record how can I get it?
by | 18 views

2 Answers

0 like 0 dislike
{% for about in aboutText|slice:":1" %}
by
0 like 0 dislike
This record is necessary to in view and pass to template.
by

Related questions

0 like 0 dislike
1 answer
asked Apr 9, 2019 by AlexMine
0 like 0 dislike
2 answers
asked May 13, 2019 by ma3xak
0 like 0 dislike
1 answer
asked Apr 12, 2019 by Konstantin18ko
110,608 questions
257,187 answers
0 comments
40,796 users