
Wanna build your own blog with articles writing opportunity? Yes, its possible! Today we're build Django based blog application with WYSIWYG editor in Admin panel. It very fast for developing.
Create new Django project or open exist, then create application inside named as blog:
django-admin startapp blog
In blog/models.py file add Model for storing your posts and articles:
from django.db import models
class Article(models.Model):
title = models.CharField(max_length=1024)
&nbs…
#backend #blog #database #django #django-admin #django-model #django-textfield #django-view #editor #integration #summernote #wysiwyg

Django - powerful framework, writed in Python for building web-based applications. Django use model-view-control (MVC) software designing pattern. With Django you can develop applications from simple sites to complex high-loaded systems. The most important idea of Django - don’t repeat yourself (DRY) philosophy. Django have a lot of out-of-box classes and functions for building beautiful applications.
This tutorial help you for start working with Django framework: create virtual environment, sta…
#applicarion #development #django #don’t-repeat-yourself #model-view-control #project
Python have open() function for working with files (read, write, modify). It open file with specified permission and returns as object. The open() function take two arguments: filename and file opening mode (both strings). Filename maybe absolute or relative. When you set only filename, Python try to open file in the same directory, which script. File open mode may be single or combination of some. File permission modes in Python:
r - read file without making any changes.
w - write in file. If fi…
#file #python #read #text #write

Django applications development may be require transfering model entries from one database to another. Also production environment need periodically backups. Django manage.py script gives the opportunity for export data in text file and import then.
Dumpdata serves for take out data. When application names not set, manage.py script export all applications, specified in INSTALLED_APPS. Usage example:
python manage.py dumpdata
You may set one or more models. Example for export preassigned applicatio…
#database #django #django-model #docker #dumpdata #editor #loaddata
Задумался о переходе с привычной Windows на дистрибутив на базе GNU/Linux? Давай вместе попробуем разобраться как сделать переход менее болезненным.
Для начала нужно выбрать сам дистрибутив. Я посоветую что-нибудь, базирующееся на deb архитектуре. Почему? Потому что готового программного обеспечения для дистрибутивов Debian и его форки гораздо больше, чем например для rpm архитектуры.
Я предпочитаю Debian, но ты можешь для начала попробовать Ubuntu или Linux Mint. В случае с Linux Mint есть две в…
#debian #driver #linux #linux-mint #multimedia #office #software #ubuntu #visual-studio-code #web-browser #для-самых-маленьких
Network Mapper or NMAP is powerful open source network scanner, which may scan network hosts, subnets and ports. NMAP may be used as CLI tool or with GUI (Zenmap). Today we show how it works in command line interface.
How to install in Debian-like systems:
sudo apt install nmap -y
After installation complete, check with nmap --help command:
user@localhost:~$ nmap --help
Nmap 7.93 ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
...
Host scanning. In case you want to scan…
#debian #linux #network #network-port #nmap #scan #ubuntu
What are regular expressions? These are patterns that help us work with text. Regular expressions (regex, regexp) used to match sequences of characters in strings: search, edit, delete any area in large texts, data generation or validation, and so on. Regexes can be used in programming languages, command line interfaces, etc...
For example I want validate email addresses from my domain. The expression will look like this:
^.*\@example\.com$
^ symbol means the beginning of an expression.
Next symbol…
#ip-address #phone-number #regex #regexp #regular-expressions
DD (Data Definition) - powerful command line interface utility, designed for work with files (copy, converting, etc...) byte-by-byte. Similar to cp command it may copy from source file (if=...) to destination file (of=...). But difference from cp command - DD may control input/output parameters in low level. Also DD may clone, backup, mirror partitions.
Most frequently used args:
if - input file, which must be copied. May be plain file or device.
of - output file. Also may be plain file or device.…
#cdrom #cli #command-line-interface #copy #dd #file #img #linux #live-usb

Your virtual private servers (VPS) is under brute-force attacks by SSH protocol, or bad bots crawling your site and searching locations like admin panels, index.php files, etc? I tried to find solution for protecting projects in WEB. His name - Fail2ban.
Note: this is not completely 100 percent protection, but is better than nothing.
Here some examples of bad bots' headers:
Go-http-client/1.1
python-requests/2.32.3
Python/3.11 aiohttp/3.9.3
Python-urllib/3.8
python-httpx/0.27.0
Ruby
curl/7.61.1
libwww-pe…
#centos #debian #fail2ban #linux #nginx #protection #security #ssh #ubuntu

This tutorial shows, how to build search view for your Django application with SearchVector class.
Why SearchQuery? SearchQuery translates the terms the user provides into a search query object that the database compares to a search vector. By default, all the words the user provides are passed through the stemming algorithms, and then it looks for matches for all of the resulting terms (documentation).
1. Configure DATABASE dictionary for using PostgreSQL database management system in your proje…
#backend #database #django #django-view #postgresql #python #search #search-vector