Advanced search

DjangoDjango - Tutorial 030. Opportunities VDS server for $ 5 for the project on Django

Jan. 5, 2018, 1:11 a.m.

Ubuntu, Django, VDS

With the growth of site functionality, as well as attendance, it was possible to successfully test the capabilities of the current VDS server, which I currently use. I would like to describe my experience with VDS, as well as show how much this VDS keeps under certain conditions and sizes of the project.

I decided to tell about it right now, because a week ago I expanded the server's capacity by purchasing additional memory.

All the further narrative will be subjective, but I hope that it will make it possible to make a general picture, so that newcomers will be able to navigate in what server they need for their needs, and this will facilitate the choice of the server.

Server Configuration

Initially, the site worked on the minimum configuration that I managed to take. The fare is $5 per month. By the way, my ISP also has a cheaper tariff (190 rubles / month), but it is fixed, whereas my current tariff allows me to configure the configuration necessary for me and increase the server's capacity to one that is not available at fixed tariffs.

Configuration:

  1. Processor cores: 2 x 2,7 GHz
  2. RAM: 512 Mb
  3. SSD: 5Gb
  4. OS: Ubuntu 16.04
  5. Access to the Internet: 100 Mbit/s

All configuration of the server was done exclusively through the console, without any auxiliary tools like ISP Manager, which also absorbs some of the RAM, so this modest RAM was enough for me for a long time

LinuxConfiguring HTTPS from Let`s Encrypt with Certbot

June 22, 2017, 5:17 a.m.

LetsEncrypt, Ubuntu, Nginx, HTTPS, SSL, HTTP

Some time ago, the SSL certificate from Let`s Encrypt ceased to be updated on the site. Judging by the mistakes, the structure of the files for organizing the keys has changed somewhat. After researching the problem, the easiest option was to install SSL certificates using the Certbot utility. This utility installs certificates in automatic mode, and automatically creates a task to update the certificate, which is based either in the cron scheduler or in systemd .

Since the site server is running on Ubuntu 16.04, the installation kit was also selected for this OS. In the case of other operating systems, Certbot also provides manuals for other systems.

If you are setting up an SSL certificate for the first time, you can use the manual on the Certbot website, if you have already configured the certificate with other utilities, for example, with the helpencrypt package without using certbot, as shown in the next article , you will probably need to do a small cleaning Before installing Certbot`a.

DjangoDjango - Tutorial 001. Deploying a site on Django + PostgreSQL + Gunicorn + Nginx

Sept. 16, 2016, 12:56 p.m.

Ubuntu, Gunicorn, Django, PostgreSQL, Nginx

Once access to the server with Ubuntu 16.04 was set in a previous article, it is time to expand on it everything necessary for operation of the site, namely:

  • Django - framework for developing web-applications in Python;
  • PostgreSQL - SQL database;
  • Gunicorn - WSGI HTTP Python server for UNIX systems;
  • Ngnix - HTTP-server and a reverse proxy server, mail proxy server and TCP / UDP general purpose proxy;
  • Supervisor - This process manager, which greatly simplifies the management of long-running programs, such as sites that you want to automatically restart after a fall.

PostgreSQLCorrection database encoding of PostgreSQL from LATIN1 to UTF8

Sept. 16, 2016, 12:38 a.m.

PostreSQL, UTF8, LATIN1, Ubuntu

In the process of server settings for the site, I had to face some problems. In particular, the problem of the PostgreSQL database encoding. The fact is that when you install the PostgreSQL, database templates created with the coding LATIN1, and on the Django site works, using UTF8 encoding. As a result, dropped out following error when trying to insert the data:

ERROR: encoding UTF8 does not match locale en_US Detail: The chosen LC_CTYPE setting requires encoding LATIN1.

Search for information, it was possible to find several solutions, including a solution that allows you to re-create the database template with the encoding UTF8. But Walk carefully on the symptoms of the problem.

LinuxInitial configuration of access to VDS at Ubuntu 16.04

Sept. 14, 2016, 12:18 p.m.

Linux, VDS, Ubuntu

Because a develop the resource EVILEG, I decided to move it to the domain COM, and transfer the website from CMS Wordpress to the framework Django. With Ruby On Rails somehow it did not work out, but with the Django process has gone almost immediately.

I did not choose another hosting, and I stayed with the current hosting TIMEWEB , by the way recommend to those who have not yet decided on his future hosting VDS.

And now we go to the initial setting up access to VDS, which provides TIMEWEB.

QtQt Linux - Lesson 002. Global HotKey in Linux

Feb. 28, 2016, 9:17 a.m.

Ubuntu, HotKey, linux, Qt, XCB, XLib

Work with the global keyboard hot keys in Windows is a trivial task than Linux, since this has WinAPI prepared methods that do not require a large amount of code. And each hotkey is set in line ID, in which the hot key can be removed.

In Linux / Unix, which uses the graphics server is the X11, with respect to Qt must use the function to register / unregister hotkeys from XLib library, but the process has to the values ​​obtained using XCB library functionality, which is being developed as an analogue XLib library, but is more low-level and written the C programming language. As in the case of Windows, for processing in the global hotkeys Qt 5 nativeEventFilter used method. I propose to make a separate class, inherited from QAbstractNativeEventFilter for processing hotkeys and set the filter to the entire application.

To set hotkeys to be used XKeysymToKeycode (to get the keys from KeySym sequence of code) and XGrabKey (to set the hotkey).

XUngrabKey function will be used for unregistration hotkey.

Project structure

  • GlobalHotkeyLinux.pro - the profile of the project;
  • mainwindow.h - header file of the main application window;
  • mainwindow.cpp - file source code of the main application window;
  • mainwindow.ui - file forms the main application window;
  • main.cpp - the main source file;
  • nativeeventfilter.h - header event filter file hotkeys;
  • nativeeventfilter.cpp - file source hotkeys event filter.

QtQt Linux - Lesson 001. Autorun Qt application under Linux

Feb. 15, 2016, 9:07 a.m.

Qt, Linux, Ubuntu, autorun, автозапуск

Let's talk about how you can add functionality in Qt application to configure startup of the application. For example, we have a settings window, and we want to make the ability to customize the dialog box Autorun application.

In contrast to the autorun in Windows , where you can use QSettings and make changes to the registry on Linux you need to create a custom executable file that will be responsible for autostart applications when a user logs into the operating system.

Say the name of the project and hence the name of the executable file will AutorunLinux , then you need to create an executable file AutorunLinux.desktop the following path:

~/.config/autostart/AutorunLinux.desktop

The contents of the executable file to do the same to other startup files of other applications that are guaranteed to get the desired result. In the case of Ubuntu Linux 15.04 / 15.10 contents of the file will receive the following:

[Desktop Entry]
Type=Application
Exec=/home/dekadent/QT/Projects/build-AutorunLinux-Desktop_Qt_5_5_1_GCC_64bit-Debug/AutorunLinux
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_GB]=AutorunLinux
Name=AutorunLinux
Comment[en_GB]=AutorunLinux
Comment=AutorunLinux
How to become an author?

Contribute to the evolution of the EVILEG community.

Learn how to become a site author.

Learn it
Donate

Good day, Dear Users!!!

I am Evgenii Legotckoi, developer of EVILEG. And it is my hobby project, which helps to learn programming another programmers and developers

If the site helped you, and you want also support the development of the site, than you can donate by following ways

PayPalYandex.Money
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 Timeweb
June 5, 2020, 11:20 p.m.
Aleksej

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

  • Result:60points,
  • Rating points-1
June 5, 2020, 11:15 p.m.
Aleksej

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

  • Result:53points,
  • Rating points-4
V
June 5, 2020, 4:47 p.m.
Vladzo

C++ - Test 005. Structures and Classes

  • Result:83points,
  • Rating points4
Last comments
June 6, 2020, 3:13 p.m.
Vladislav Melenchuk

How to install and setting up Django JET

Можно использовать six и оттуда импортировать unicode. Я так решил проблему) Но всё равно откатился обратно на админку джанги.
June 6, 2020, 11:20 a.m.
BL4CK R4BBIT

How to install and setting up Django JET

на Django >3+ работать не будет. Либо придется лезть внутрь и переопределять метод unicode . Либо писать декоратор
June 5, 2020, 10:52 a.m.
progammist

Распознавание изображений на Python с помощью TensorFlow и Keras

Огромное спасибо за метериал, по-больше бы подобных статей (с подробным описанием работы и примерами применения) на тему современных технологий. Вопрос поразмышлять. На текущий момент реал…
June 5, 2020, 1:39 a.m.
Evgenij Legotskoj

Qt/C++ - Tutorial 091. How to write a custom delegate controlling the highlighting of a row in a table

По-моему, смысла в этом нет особого. Если делегат будет игнорировать настройки таблицы, то это приведёт ещё к большему непониманию, что вообще происходит, для программиста, который после вас буд…
June 5, 2020, 1:34 a.m.
IscanderChe

Qt/C++ - Tutorial 091. How to write a custom delegate controlling the highlighting of a row in a table

Сижу, размышляю: можно ли переписать делегата так, чтобы независимо от настроек строк выделялись строки?
Now discuss on the forum
u
June 6, 2020, 7:26 a.m.
ubomj

Галерея изображений

delete
s
June 6, 2020, 1:54 a.m.
shuric

Qt/C++ Определение положения курсора над действие(кнопкой) в QToolBar

Доброго дня. Возник вопрос - как можно определить что курсор находится над определенным действием(кнопкой) в qtoolbar ? mainwindow.cpp MainWindow::MainWi…
s
June 6, 2020, 12:45 a.m.
shuric

Qt/C++ особенности QProxyStyle

Да, Вы правы. Код был скопирован с сайта (уже не помню с какого), но решил пойти по пути более легком. Пришлось переписать - кому интересно: использовал stackedWidget для пе…
June 5, 2020, 11:08 p.m.
Aleksej

Посоветуйте новичку (базы данных и Qt, что учить)

Блин, а я недавно купил Шлее Qt 5.10 :( С детства хотел стать программистом, баловался Паскалем, писал простенькие программки на Delphi, создавал движок на php, изучал C (забросил и перешел на п…
June 5, 2020, 1:09 p.m.
IscanderChe

QPlainTextEdit настройка цвета фона

Вечер добрый. Пытаюсь настроить цвет фона QPlainTextEdit следующим образом: CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent){ ... QPalette::ColorRole role = bac…
About
Services
© EVILEG 2015-2020
Recommend hosting TIMEWEB