Advanced search
Evgenij LegotskojNov. 3, 2019, 4:03 a.m.

DjangoEVILEG-CORE. Caching properties of model objects using model_cached_property

ESNF-C, Django, model_cached_property, EVILEG

To speed up the site, in addition to optimizing database queries, you can use caching.

Django allows you to cache:

  • individual view , both Class Based View , and ordinary functions view
  • whole templates or parts of these templates
  • QuerySet
  • as well as properties of model objects using cached_property

I was interested in the ability to cache individual properties of model objects for heavy computing or heavy database queries.
The cached_property decorator has such a functional, but the drawback for me was that caching occurred only for the lifetime of the object.
Whereas I need caching for a longer period of time than the existence of an object when requesting a page. And also I needed to cache properties depending on the input arguments. This decorator on the site caches the number of likes and dislikes, as well as information about whether the current user liked a particular content object.

Thus the decorator model_cached_property was written

Evgenij LegotskojOct. 27, 2019, 4:56 a.m.

DjangoEVILEG-CORE. Using Google reCAPTCHA

Google, reCAPTCHA, EVILEG, CORE, ESNF-C

This will be the first article on the use of a set of established utilities that are present in the core of the EVILEG site. This part of the site’s program code is in open source, so I want to talk about what functionality is present in this battery and how to use it.

I'll start by using Google reCAPTCHA , and what is required to quickly implement this functionality.

Evgenij LegotskojOct. 7, 2019, 1:42 a.m.

EVILEGRelease EVILEG-CORE 0.0.4

ESNF-C, EVILEG

After about 5 months of refinement of the site, I release a more elaborate version of the evileg_core package.

This release includes both new functions and utilities, and the old functionality has been finalized. For example, Markdown field behavior has been improved. Initially, EMarkdownField drastically reduced content rendering performance, but the problem was identified and resolved.

Evgenij LegotskojMay 11, 2019, 11:37 a.m.

EVILEGRelease EVILEG-CORE 0.0.3

ESNF-C, EVILEG

Good day! I am happy to present the first release of the EVILEG Social Network Framework - Core (ESNF-C).

The release is version 0.0.3. I successfully spent the first two versions on setting up the release in PyPi so that I could install the package not only from the repository or manually build it, but I would use the opportunity to install it through the pip utility.

pip install evileg_core
Evgenij LegotskojDec. 9, 2018, 8:22 a.m.

EVILEGReplacing WYSIWYG Editor with Markdown Editor

EVILEG, markdown, ESNF-C

After lengthy attempts to cope with JavaScript and its glitches in different browsers, I refused to write a WYSIWYG editor.

Thanks to the community (a survey was conducted in the public in VKontakte), which also shares my point on this matter. Namely, it is better to add a normal Markdown editor than Wysiwig.

Evgenij LegotskojJuly 31, 2018, 2:56 a.m.

DjangoOpen source EVILEG

ESNF-ICO, ESNF-DOC, ESNF-C, ESNF, ESNF-LD, Django, EVILEG

There was probably something that many users of the resource EVILEG would like to see among Web developers.

It was decided to open the sources of EVILEG, especially since I repeatedly received requests to show the source of the resource and even suggestions for the feasible improvement of the site code.

Thus, weighed all the pros and cons, I decided that sending the source code to EVILEG in Open Source is not such a bad idea.

Timeweb

Let me recommend you the excellent hosting on which EVILEG is located.

For many years, Timeweb has been proving his stability.

For projects on Django I recommend VDS hosting

View Hosting
VD

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

  • Result:73points,
  • Rating points1
Ds

C++ - Тест 003. Условия и циклы

  • Result:64points,
  • Rating points-1
o

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

  • Result:86points,
  • Rating points6
Last comments
D:

QML - Lesson 016. SQLite database and the working with it in QML Qt

Добрый день, пытаюсь разобраться и подргнать пример под себя. Есть бд с огромным количеством полей. В приложении на виджетах при использовании QTableView все работает и путем простого sql запрос…

Django - Tutorial 039. Adding private messages and chats on the site - Part 2 (Dialogue and chat counter with unread messages)

Добавляйте поле файла в модель сообщения. И в форме сообщения указывайте, что поле с файлом.
s

Django - Tutorial 023. Like Dislike system using GenericForeignKey

все, я со всем разобрался!) Извините!)
s

Django - Tutorial 023. Like Dislike system using GenericForeignKey

Доброго времени суток!) Я случайно набрел на вашу статью, и она помогла мне решить некоторые мои трудности, я прошел за вами по шагам, в попытках адаптировать это под себя, и возник вопрос. У ва…
Now discuss on the forum

Динамическое заполнение StackLayout в qml

Всем привет. Пытаюсь решить такую задачку, есть TabBar и его кнопки. StackLayout{ currentIndex: tabBar.currentIndex A {id: tabA} B {id: tabB} C {id: tabC} D {id: ta…

Наследование QWidget

Добрый день В addWidget нужно ещё указывать номер строки и колонки, куда добаляется виджет. И в вашем случае лучше Диалоговое окно не наследовать сразу от QDialog и W, а наследовать …
M

QML: изменение стиля при наведении и при нажатии на кнопку

enabled = false перестанет быть активной и не будет ни на что реагировать) Хм.. по-моему пробовал такое. Проверю ещё раз после работы. Ура, спасибо большо…
U

Динамическое наполнение StackView QML

Во затупил))) Спасибо за все))) StackView.push("ModuleTip1.qml") ну или в сложной иерархии StackView.push("qrc:/folder/ModuleTip1.qml") и всего делов... Не пойму, почему сра…

QEventLoop тормозит при удалении экземпляра

Думаю, что нет. Лучше вообще без исключений, но не всегда возможно.
About
Services
© EVILEG 2015-2020
Recommend hosting TIMEWEB