Evgenii Legotckoi
Evgenii LegotckoiSept. 5, 2022, 3:45 a.m.

Analysis of errors in the development and promotion of a site on Django - Custom tag<cut>

And now some thoughts on the topic of custom tags, and whether they should be introduced at all.

The short answer is NO.

Now let's think about this topic - "Why?" . There is such a well-known Russian-language resource Habr, who remembers, it was originally also called Habrahabr. So they added a custom XML tag<cut> , which cut off the part of the article that was supposed to go in the preview, and the other part was hidden in the article preview. Thus, the user "removed the article under the cut" . At first glance, it is quite a good solution for the user to decide what should be in the article preview so that the article attracts attention in the site's news feed. On the other hand, how many times could you see comments: "Author, take the article under the cut!" . And here lies the main problem, in my opinion. After all, if an ordinary user needs to be constantly reminded of some basic functionality of the site in order for him to use it, then something is already wrong here.

Of course, Habr can afford to use such a tag, since he has developed and formed a community that monitors the implementation of such conventions. But if you are developing a small site that is not yet so famous, then maybe you should not add extra work to yourself? Think for yourself, because you will be the person who will constantly remind users to use<cut> . Either you will correct the articles yourself or write an automatic addition of a tag after a couple of paragraphs.

In fact, this is a waste of time. Personally, I regret that I wasted my time working on such functionality. After all, Django has a truncatewords_html tag in the template engine that allows you to truncate a certain number of words of content and closes all tags properly. In this case, even images can get into the preview of the article. So why not use a ready-made solution? After all, whoever really wants to show a picture in a preview will add it to the beginning of the article and everything will look as it should. In general, whoever really needs it will figure it out. And forcing the user to use such specific functionality for the most basic actions, like writing a post on the site, is not the best idea.

And what useless custom tags did you introduce?

We recommend hosting TIMEWEB
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.

Do you like it? Share on social networks!

NSProject
  • Sept. 5, 2022, 2:05 p.m.

Исправте пожалуйста название тега

truncatehtml_words

на

truncatewords_html
Evgenii Legotckoi
  • Sept. 5, 2022, 2:15 p.m.

Исправил, спасибо

Comments

Only authorized users can post comments.
Please, Log in or Sign up
MB

Qt - Test 001. Signals and slots

  • Result:57points,
  • Rating points-2
MB

C++ - Test 001. The first program and data types

  • Result:60points,
  • Rating points-1
GK

C++ - Test 005. Structures and Classes

  • Result:0points,
  • Rating points-10
Last comments
J
JonnyJoJune 9, 2023, 12:14 a.m.
Qt/C++ - Lesson 019. How to paint triangle in Qt5. Positioning shapes in QGraphicsScene Евгений, здравствуйте! Решил поэкспериментировать немного с кодом из этого урока, нарисовать вместо треугольника квадрат и разобраться с координатами. В итоге, запутался. И ни документация,…
J
JonnyJoMay 26, 2023, 2:24 a.m.
How to make game using Qt - Lesson 2. Animation game hero (2D) Евгений, благодарю!
Evgenii Legotckoi
Evgenii LegotckoiMay 25, 2023, 4:49 p.m.
How to make game using Qt - Lesson 2. Animation game hero (2D) Код на строчка 184-198 вызывает перерисовку области на каждый 4-й такт счётчика. По той логике не нужно перерисовывать объект постоянно, достаточно реже, чем выполняется игровой слот. А слот вып…
J
JonnyJoMay 21, 2023, 10:49 p.m.
How to make game using Qt - Lesson 2. Animation game hero (2D) Евгений, благодарю! Всё равно не совсем понимаю :( Если муха двигает ножками только при нажатии клавиш перемещение, то что, собственно, делает код со строк 184-198 в triangle.cpp? В этих строчка…
Evgenii Legotckoi
Evgenii LegotckoiMay 21, 2023, 5:57 p.m.
How to make game using Qt - Lesson 2. Animation game hero (2D) Добрый день. slotGameTimer срабатывает по таймеру и при каждой сработке countForSteps увеличивается на 1, это не зависит от нажатия клавиш, нажатая клавиша лишь определяет положение ножек, котор…
Now discuss on the forum
T
TwangerJune 7, 2023, 11:12 p.m.
Ошибка при выполнении триггерной функции (GreenPlum) Есть 3 таблицы fact_amount со структурой: CREATE TABLE fact_amount ( id serial4 NOT NULL, fdate date NULL, type_activity_id int4 NULL, status_id int4 NULL, CONSTRAINT fact…
AR
Alexander RyabikovJune 7, 2023, 1:35 a.m.
Работа с QFileSystemModel Вопросик по теме QFileSystemModel в Linux. Он, как и положено, обновляется самостоятельно, если директория локальная. Но, вот, сетевая папка (у меня шара samba) не обновляется. Как её можно…
Evgenii Legotckoi
Evgenii LegotckoiApril 16, 2023, 4:07 p.m.
Мобильное приложение на C++Qt и бэкенд к нему на Django Rest Framework Да, это возможно. Но подобные вещи лучше запускать через celery. То есть drf принимает команду, и после этого регистрирует задачу в celery, котроый уже асинхронно всё это выполняет. В противном …
АБ
Алексей БобровDec. 15, 2021, 8:03 a.m.
Sorting the added QML elements in the ListModel I am writing an alarm clock in QML, I am required to sort the alarms in ascending order (depending on the date or time (if there are several alarms on the same day). I've done the sorting …

Follow us in social networks