Advanced search
m
master199Nov. 28, 2018, 11:03 a.m.

AndroidListView, как сохранить позиции после поиска?

ListView, activity, Search, position

ListView, как сохранить позиции после поиска?

Evgenij LegotskojJuly 5, 2018, 3:05 a.m.

DjangoDjango - Tutorial 035. Different templates for rendering different types of content in the search results

Django, template, content, Search

Constant visitors of the site who use the search on the site, probably noticed that the display of articles differs from displaying comments in the search engine issue of the site. This was achieved by the fact that each content type has its own template for rendering, which is substituted for the rendering of the page, depending on what content was found in the search.

Let's look at the example of issuance.

You see, here the presentation of the comment differs from the article, but they are output in the framework of one search issue, as was done in the previous article.

But this is done much more elegantly than selecting via if else . Honestly, I myself really like this decision.

Evgenij LegotskojJuly 4, 2018, 2:38 a.m.

DjangoDjango - Tutorial 034. How to do a search on several data models

Search, Model, QuerySet, Django

In previous articles, we considered how to do a search on the site on the site. Namely:

But what if you have more than one type of content. You can have articles, comments, forum and messages on the forum. How then to be?

If you want to do everything yourself, without using third-party libraries, then you will need to do a search on all the necessary models and combine the result. I have done exactly the same on the site.

Evgenij LegotskojJan. 16, 2018, 2:19 a.m.

DjangoDjango - Tutorial 032. Advanced search options

Django, Search

The site has functional, thanks to which you can ask a question on the forum with an article on the site to which this question relates in one way or another. This is done through external keys from the topic on the site's forum to articles. In this case, the foreign key may not be.

article = models.ForeignKey(Article, verbose_name=_("Статья"), null=True, blank=True)

Thus, at the end of the article you can see how many questions on the forum are given for this article. This allows you to improve the page linking of the site, and also gives users the opportunity to find similar questions about the article they are studying.

The main question for me was how to implement a list of topics on the forum so as not to overload the site with additional pages that would complicate the navigation. The solution was simple enough: add a search option on the forum with additional advanced search keys. Namely, the article key, which would define the article id , for which you want to filter out all topics on the forum that contain a foreign key for an article with this id .

This approach allowed to change the main page of the forum, to expand the functionality of the forum with an additional search and to exclude the addition of a new presentation and template for new pages.

Evgenij LegotskojOct. 4, 2016, 12:09 p.m.

DjangoDjango - Tutorial 012. Site search with pagintaion based on Django

Поиск, Postgres, Search

For the organization of the search on the site, which is based on the Django , and uses a PostgreSQL database, you can use the module to search through the database that comes with Django. Especially because the search for full-text search provides sufficiently for a small site.

But in order to issue search queries looked more like the home page, the ability to add pagination of pages of issue, and the results will be displayed on the 10 pieces on the same page. And for that, we will also use django_bootstrap3 module.

As a result, we have the following plan of action:

  1. Adding an application to search for the organization;
  2. Adding search url;
  3. Add a search box;
  4. This search page template.
  5. Describes the representation for issuing the search processing;
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
y

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:50points,
  • Rating points-4
n

C++ - Test 005. Structures and Classes

  • Result:41points,
  • Rating points-8
s

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

  • Result:42points,
  • Rating points-8
Popular publications in the last 90 Days
Last comments
f
  • fryn3
  • Oct. 21, 2021, 5:24 a.m.

QML - Tutorial 038. Using the clip property to crop child objects inside Item or Rectangle

Зачем внутри OpacityMask Item, почему сразу Rectangle не вставить? И что за rect.adapt? Мое предложение: layer.enabled: true layer.effect: OpacityMask { …
s

Qt/C++ - Lesson 060. Configuring the appearance of the application in runtime

Добрый вечер, на "лету" не работает, только перезапуск
s

Qt/C++ - Lesson 060. Configuring the appearance of the application in runtime

Спасибо, завтра опробую и отпишусь по результату

Django - Tutorial 007. Adding Pagination based on django-bootstrap3

Просто список каких-нибудь объектов передавайте, который дёрнули ищ api стороннего сервера from django.core.paginator import Paginatorobjects = ['john', 'paul', 'george', 'ringo']p = Pagina…
b

PyQt5 - Tutorial 009. Using QThread with MoveToThread

Спасибо большое
Now discuss on the forum
o

Применение стилей *.qss к собственным виджетам.

или взять код отсюда пример переписать его под свои нужды
j
  • juvf
  • Oct. 21, 2021, 7:31 a.m.

Qt Quick Virtual Keyboard

В QtCreator есть пример на QML с виртуальной клавиатурой "Qt Quick Virtual Keyboard - Basic Example". Собрал, работает. Собрал свой хеловорд свою программу состоящую из главного окна …

QScrollArea dynamically add QCheckBoxes

Всё правильно. Это просто спамер, который отправился в вечный бан.
  • Nomad
  • Oct. 15, 2021, 6:39 a.m.

Вопрос из раздела "как реализовать"

Всем привет. Есть бизнес логика которую надо реализовать на джанге, она состоит в следующем: надо реализовать функционал регистрации/авторизации компаний у которого есть свой дашборд …

Проблема с созданием файлов перевода для составного проекта

Я имею ввиду, если у вас был старые ts файлы, то написать парсер, который составил бы словарь переводов. Например. "Hello world" - "Привет мир" "Hello dev" - "Привет dev" и…
About
Services
© EVILEG 2015-2021
Recommend hosting TIMEWEB