Advance

Tutorial Install and run Django on Fedora 33

Tutorial Install and run Django on Fedora 33
0
(0)

Django is a high-level framework or platform for web programming in Python. The platform enables “rapid development” and pragmatic design of web applications for programmers and developers. The Django library allows users to generate far better applications faster with less coding. Since Django was developed by experts in this field, it can solve most of the problems in website development. In fact, with Django, you only have to focus on programming. So there is no need to create new solutions. Django is free and part of the open-source framework. In this article, we are going to teach you about the Tutorial Install and run Django on Fedora 33. You can visit the packages available in Eldernode if you wish to purchase a Linux VPS server.

How to Install and run Django on Fedora 33 Step By Step

The Django framework is implemented using the Python programming language. This makes web design easier for programmers. Developers can use Python grammar rules to verify and store code. In addition, they can perform some activities without writing code and speed up the website development process. Its design rules are programmed to minimize the time required to develop a website. Developers can quickly design websites for a wide range of business needs using Django features. Most Python writers who have little time to achieve project goals use the Django framework.

In the next section, we will examine the most important features of Django. Then we will teach you how to install and run it on Fedora 33. Please join us.

Recommended Article: How to Install WebSploit On Ubuntu 20.04

Benefits of Django (Install and run Django on Fedora)

Among the benefits of using the Django Library are the following:

1- Support for Object-Relational Mapping | ORM

The Django platform creates a bridge between the “Data Model” and the “Database Engine”. It also supports a large collection of Database Management Systems such as MySQL, Oracle, PostgreSQL, and more. Django also supports NoSQL databases through a special branch of the platform called Django-nonrel. Currently, the only NoSQL databases supported by Django are the MongoDB and Google App Engine platforms.

2- Multilingual Support

The Django platform supports the development of multilingual websites through the platform’s internal internationalization system. This allows the programmer and developer to develop websites that inherently support multiple world languages.

3- Supporting various web development platforms and frameworks

The Django platform provides built-in support for platforms such as Ajax, RSS, Caching, and more.

4- Management Graphical User Interface | GUI

The Django platform provides programmers and developers with a ready-to-use user interface for website management activities and their components.

5- Development Environment

The Django Library comes with a lightweight Web Server. It, therefore, facilitates the process of developing and testing “end-to-end” applications.

Install Django on Fedora 33 with PIP/PIP3

Before you start installing Django, you need to install Python 3 on your Fedora system. To do this you can use the following command:

sudo dnf -y install vim python3 python3-pip

It should be noted that in this method we want to install Django on Fedora 33 with pip3. Before doing so, you should check your Python version by running the following command:

python3 -V

Now you need to install pip3 by executing the following commands:

sudo dnf -y install python3-pip
pip3 -V
pip 18.0 from /usr/lib/python3.7/site-packages/pip (python 3.7)

After you have successfully installed pip3, you should now install Django using the following command:

pip3 install --user Django

Note that installing Django gives you the Django-admin command to manage projects:

which django-admin
~/.local/bin/django-admin

You can also check the Django-admin version using the following command:

django-admin --version

Install Django on Fedora 33 from Git

In this section, we will teach you how to install Django using the Git source code. It is interesting to know that you can easily install Django from source code. Before doing so, you must install Git using the following command:

sudo dnf -y install git

You can also check the main branch of Django development by executing the following command. Note that this will create a Django directory in your current directory.

git clone https://github.com/django/django.git

Finally, you need to enter the Django code to make the Django-admin tool command available. To do this, run the following command:

pip3 install -e django/

How to run Django on Fedora 33 step by step

In this section, we will examine how to run Django and how to create a Django test application. You can create a Django test application by following the instructions below:

mkdir projects
cd projects
django-admin startproject test_app
cd test_app

As you can see in the commands above, test_app is the name of our Django project. It is then necessary to execute the pending migrations by executing the following command:

$ python3 manage.py migrate

You can create a Django project superuser account using the following commands from your Django application directory:

$ python3 manage.py createsuperuser

After executing the above command, you will be asked questions about your username, email address, and password. The superuser is then successfully created.

How to allow external access to the Django web application

The important thing to note is that Django does not allow external access to the program by default. So you need to define the ACL first.

$ vim test_app/settings.py

Then in the next step, you need to edit the ALLOWED_HOSTS line to whitelist your IP or computer LAN subnet.

ALLOWED_HOSTS = ['your computer IP']

Finally, after successfully completing all the above steps, you can now start the Django application server:

$ python3 manage.py runserver 0.0.0.0:8090

Note that if you have successfully completed the steps of this tutorial, you can see the successful installation message by opening the address below. Then you can log in by entering your username and password.

http://[server IP/hostname]:8090
Recommended Article: Tutorial Install and run Django on Fedora 33

Conclusion

In this tutorial, we tried to teach you how to Install and run Django on Fedora 33. It should note that you can refer to the article How to install Django on Ubuntu 20.04 if you wish.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

One thought on “Tutorial Install and run Django on Fedora 33

  1. The article was absolutely fantastic! Lot of great information which can be helpful in some or the other way.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day