<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Django Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/django/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sat, 02 Oct 2021 16:08:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install Django on Debian 11</title>
		<link>https://www.osradar.com/install-django-debian-11/</link>
					<comments>https://www.osradar.com/install-django-debian-11/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 05 Oct 2021 23:08:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bullseye]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=32490</guid>

					<description><![CDATA[<p>Hello friends. If you are fond of Python but also web development then you have to try Django. This powerful Python-based framework will allow you to develop robust web applications quickly and easily. So, in this post, you will learn how to install Django on Debian 11. Introducing to Django Django is an open-source framework [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-django-debian-11/">Install Django on Debian 11</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello friends. If you are fond of Python but also web development then you have to try Django. This powerful Python-based framework will allow you to develop robust web applications quickly and easily. So, in this post, you will learn how to install Django on Debian 11.</p>



<h2 id="introducing-to-django">Introducing to Django</h2>



<p><a href="https://www.djangoproject.com/" target="_blank" rel="noreferrer noopener">Django </a>is an open-source framework written in Python and based on the MTV (Model Template View) design pattern for developing websites, applications, and APIs (with Django REST Framework).</p>



<p>Django was designed to help us develop applications from concept to completion as quickly as possible. It also takes security seriously and helps us avoid many common security bugs.</p>



<p>Moreover, Django’s ability to scale quickly and flexibly is one of its main advantages. So if you have a website such as a forum that you are going to add features to later, Django is a good alternative.</p>



<p>In addition, Django is incredibly versatile and can be used to build everything from content management systems to social networks and scientific computing platforms.</p>



<p>So, let’s get started.</p>



<h2 id="install-django-on-debian-11">Install Django on Debian 11</h2>



<p>Before getting started with Django, it’s necessary to update the distribution so that we can avoid problems.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p>Now we need to<a href="https://www.osradar.com/how-to-install-pip-on-ubuntu-20-04/" target="_blank" rel="noreferrer noopener"> install PIP</a>. This tool will help us with the installation of Django on our system.</p>



<pre class="wp-block-preformatted">sudo apt install python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  python-pip-whl python3-wheel
Recommended packages:
  build-essential python3-dev
The following NEW packages will be installed:
  python-pip-whl python3-pip python3-wheel
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 2,309 kB of archives.
After this operation, 3,671 kB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p>Next, we have to update PIP to the latest stable version available.</p>



<pre class="wp-block-preformatted">pip3 install -U pip
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (20.3.4)
Collecting pip
  Downloading pip-21.2.4-py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 7.6 MB/s
Installing collected packages: pip
Successfully installed pip-21.2.4</pre>



<p>Now check the installed version by running the following command</p>



<pre class="wp-block-preformatted">pip3 --version
pip 21.2.4 from /home/angelo/.local/lib/python3.9/site-packages/pip (python 3.9</pre>



<p>Now you can install Django on your system with the help of PIP.</p>



<pre class="wp-block-preformatted">sudo pip3 install Django
Installing collected packages: sqlparse, pytz, asgiref, Django
Successfully installed Django-3.2.7 asgiref-3.4.1 pytz-2021.3 sqlparse-0.4.2</pre>



<p>When you install Django, it will enable the <code>django-admin</code> command that we will use to administer Django. For now, check the installed version.</p>



<pre class="wp-block-preformatted">django-admin --version
3.2.7</pre>



<h3 id="testing-django-on-debian-11">Testing Django on Debian 11</h3>



<p>Now we need to test the installation of Django and for that, we’re going to create a new project</p>



<p>Create a new folder dedicated to the project and go to it</p>



<pre class="wp-block-preformatted">mkdir example
cd example</pre>



<p>You can replace <code>example</code> with any name you want. Now create the new project.</p>



<pre class="wp-block-preformatted">django-admin startproject project</pre>



<p>Replace <code>project</code> with the name you will give to your project.</p>



<p>This will create a folder with the same name that you need to access.</p>



<pre class="wp-block-preformatted">cd project</pre>



<p>Now you need to apply the default settings</p>



<pre class="wp-block-preformatted">python3 manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
.
.
.</pre>



<p>Next, it’s time to create an admin user for Django.</p>



<pre class="wp-block-preformatted">python3 manage.py createsuperuser
Username (leave blank to use 'angelo'):
Email address: angelo@osradar.com
Password:
Password (again):
Superuser created successfully.</pre>



<p>There you will be asked for a username and password to use.</p>



<p>Now you have to configure Django to allow remote access.</p>



<pre class="wp-block-preformatted">nano project/settings.py
ALLOWED_HOSTS = ['IP_PC']]</pre>



<p>Save your changes and close the editor.</p>



<pre class="wp-block-preformatted">python3 manage.py runserver 0.0.0.0.0:8080
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
October 02, 2021 - 14:45:55
Django version 3.2.7, using settings 'project.settings'
Starting development server at http://0.0.0.0:8080/
Quit the server with CONTROL-C.</pre>



<p>Now open your web browser and go to <code>http://your-pc:8080</code> and you will see the main Django screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1366" height="682" src="https://www.osradar.com/wp-content/uploads/2021/10/1-1024x511.png" alt="1.- Django site running" class="wp-image-32550" srcset="https://www.osradar.com/wp-content/uploads/2021/10/1-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/10/1-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/10/1-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/10/1-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/10/1-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/10/1.png 1366w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption>1.- Django site running</figcaption></figure>



<p>Then, to access the admin panel, go to <code>http://your-pc:8080/admin</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/10/2-1024x511.png" alt="2.- Django login page" class="wp-image-32552" srcset="https://www.osradar.com/wp-content/uploads/2021/10/2-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/10/2-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/10/2-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/10/2-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/10/2-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/10/2.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Django login page</figcaption></figure>



<p>After logging in you will see the dashboard.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/10/3-1024x511.png" alt="3.- Django admin panel" class="wp-image-32553" srcset="https://www.osradar.com/wp-content/uploads/2021/10/3-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/10/3-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/10/3-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/10/3-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/10/3-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/10/3.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- Django admin panel</figcaption></figure>



<p>So, enjoy it.</p>



<h2 id="conclusion">Conclusion</h2>



<p>So, Installing Django on our system can help us if we are starting in this world of Python and the web. This process is made easy thanks to tools like PIP.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-django-debian-11/">Install Django on Debian 11</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-django-debian-11/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Django on Windows 10.</title>
		<link>https://www.osradar.com/how-to-install-django-on-windows-10/</link>
					<comments>https://www.osradar.com/how-to-install-django-on-windows-10/#comments</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Sun, 12 Jan 2020 01:28:23 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python windows 10]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=17623</guid>

					<description><![CDATA[<p>Hi, how are you? It&#8217;s a real pleasure to be with you again. In this opportunity, we are going to talk about a free and open-source web application framework written in Python. Indeed, I&#8217;m talking about Django. A web framework is a set of components that help to develop websites easier and faster. In other [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-django-on-windows-10/">How to install Django on Windows 10.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hi, how are you? It&#8217;s a real pleasure to be with you again. In this opportunity, we are going to talk about a free and open-source web application framework written in Python. Indeed, I&#8217;m talking about Django. A web framework is a set of components that help to develop websites easier and faster. In other words, <a href="https://www.djangoproject.com/" target="_blank" rel="noreferrer noopener" aria-label="Django (opens in a new tab)">Django</a> is a web framework designed to make applications of any complexity in a very reasonable time. In addition, its fundamental goal is to facilitate the creation of complex websites. As you can see, it is a framework of undoubted utility. Consequently, let&#8217;s see how to install Django on Windows 10.</p>



<h2>Prerequisites</h2>



<p>Django&#8217;s installation is managed from PIP.  This is a package management system used to install and manage software packages written in Python. Consequently, it is indispensable to have Python installed in Windows 10. To know how to do it, please check <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://www.osradar.com/how-to-install-python-3-in-windows-10/" target="_blank">here</a>.</p>



<h2>Preparing for installation.</h2>



<p>In the first place, creates a folder in any location. I recommend the root directory. In this folder, the projects will be saved. Likewise, assign the name you want. In this case, I&#8217;ll use <em>django</em>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django.jpg" alt="Create a folder with the name django and place it in the root of the directory." class="wp-image-17624" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Create a folder with the name django and place it in the root of the directory.</figcaption></figure>



<h2>Create a virtual environment for the project.</h2>



<p>In order to develop the project, it is necessary to create a virtual environment. With this in mind, open a Command Prompt and use the CD command to go to the django folder.</p>



<pre class="wp-block-preformatted">cd..
cd..
cd django</pre>



<p>Once inside the folder, proceed to create the environment, typing the following command:</p>



<pre class="wp-block-preformatted">py -m venv osradar</pre>



<p>Please remember to replace <em>osradar</em> with the name you want to assign to the virtual environment.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django1.jpg" alt="Creating the virtual environment" class="wp-image-17626" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django1.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django1-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django1-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django1-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django1-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django1-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Creating the virtual environment</figcaption></figure>



<p>Once the environment is created, all that remains is to activate it. With this in mind, please type the following command:</p>



<pre class="wp-block-preformatted">osradar\Scripts\activate</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django2.jpg" alt="Activate the environment." class="wp-image-17627" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django2.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django2-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django2-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django2-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django2-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django2-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Activate the environment.</figcaption></figure>



<h2>Downloading at installing Django</h2>



<p>As we said at the beginning, in order to install Django, you need to use PIP. So, open a CMD from the project folder previously activated, and enter the following command:</p>



<pre class="wp-block-preformatted"> pip install Django==3.0.2</pre>



<p>Press enter and wait for the wizard to download and install the framework.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django3.jpg" alt="Downloading and installing Django." class="wp-image-17629" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django3.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django3-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django3-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django3-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django3-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django3-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Downloading and installing Django.</figcaption></figure>



<p>After installing Django, it&#8217;s time to verify the installation. To do so, type the following command:</p>



<pre class="wp-block-preformatted">pip freeze</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="468" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django5.jpg" alt="Testing Django's installation" class="wp-image-17631" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django5.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django5-300x137.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django5-768x351.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django5-696x318.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django5-919x420.jpg 919w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Testing Django&#8217;s installation</figcaption></figure>



<p>If everything is working correctly, the console should display the version of the installed items.</p>



<h2>Create a new project.</h2>



<p>Then create your first project in Django. With this in mind, open a Command Prompt from the virtual environment and execute this command:</p>



<pre class="wp-block-preformatted">django-admin startproject Liberator</pre>



<p>Please remember to replace the word <em>Liberator</em> with the name of your project.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="558" height="52" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django7.jpg" alt="Create a new project." class="wp-image-17632" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django7.jpg 558w, https://www.osradar.com/wp-content/uploads/2020/01/django7-300x28.jpg 300w" sizes="(max-width: 558px) 100vw, 558px" /><figcaption>Create a new project.</figcaption></figure>



<h2>Running the server</h2>



<p>After the project is created, it&#8217;s time to run the server. With this in mind, open a CMD from the newly created project folder. Then execute this command:</p>



<pre class="wp-block-preformatted">python manage.py runserver</pre>



<p>Press enter, if everything is correct the server will start.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django8-1.jpg" alt="Django server running" class="wp-image-17636" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django8-1.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django8-1-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django8-1-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django8-1-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django8-1-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django8-1-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption> Django server running </figcaption></figure>



<p>After starting the server, please copy the IP address to your web browser.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/01/django6.jpg" alt="Django's server running successfully." class="wp-image-17637" srcset="https://www.osradar.com/wp-content/uploads/2020/01/django6.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/01/django6-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/01/django6-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/01/django6-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2020/01/django6-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/01/django6-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Django&#8217;s server running successfully.</figcaption></figure>



<p>We&#8217;ve finally seen how to install Django on Windows 10. From now on you can use this powerful framework written in Python. That&#8217;s all for now, please share this post on your social networks. See you next time.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-django-on-windows-10/">How to install Django on Windows 10.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-django-on-windows-10/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Django on Ubuntu 18.04?</title>
		<link>https://www.osradar.com/install-django-ubuntu-18-04/</link>
					<comments>https://www.osradar.com/install-django-ubuntu-18-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 05 Dec 2018 02:33:55 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7971</guid>

					<description><![CDATA[<p>As you know, web development is becoming more and more important among programmers. Just recognize that many services require the cloud to work. For this reason, many developers are more and more interested in making applications with cutting-edge technologies for their applications. So, today, I will show you how to install Django in Ubuntu 18.04. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-django-ubuntu-18-04/">How to install Django on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As you know, web development is becoming more and more important among programmers. Just recognize that many services require the cloud to work. For this reason, many developers are more and more interested in making applications with cutting-edge technologies for their applications. So, today, I will show you how to install Django in Ubuntu 18.04.</p>
<p><a href="https://www.djangoproject.com/" rel="noopener">Django</a> is a framework for web development that uses Python as the programming language. It is very popular because it can make sites and web applications of high complexity with reasonable times and works very well with high user traffic.</p>
<p>So, let&#8217;s do it.</p>
<h1>Install Django on Ubuntu 18.04</h1>
<p>Actually, there are three different ways to install Django. This is due to the flexibility of <a href="https://www.osradar.com/get-the-latest-python-on-linux/" rel="noopener">Python</a> as a programming language.</p>
<ol>
<li>You can install Django using pip.</li>
<li>The second way is, install Django using Virtualenv.</li>
<li>And the third option is to download it from the git repository.</li>
</ol>
<p>In this tutorial, I will use the second option. So let&#8217;s get to work.</p>
<p>First, you need to know what is Virtualenv. Virtualenv is an application that allows you to create multiple virtual environments in Python. Each virtual environment can have its own version of the interpreter and separate configurations.</p>
<p>So, install it using pip.</p>
<pre class="">:~$ sudo apt install python3-pip</pre>
<p><figure id="attachment_7972" aria-describedby="caption-attachment-7972" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7972" src="https://www.osradar.com/wp-content/uploads/2018/12/1-3.png" alt="1.- Installing python pip" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/1-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/1-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/1-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/1-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/1-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/1-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7972" class="wp-caption-text">1.- Installing python pip</figcaption></figure></p>
<p>Check the pip version installed.</p>
<pre class="">:~$ pip3 --version</pre>
<p><figure id="attachment_7973" aria-describedby="caption-attachment-7973" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7973" src="https://www.osradar.com/wp-content/uploads/2018/12/2-3.png" alt="2.- checking the installed version" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/2-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/2-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/2-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/2-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/2-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/2-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7973" class="wp-caption-text">2.- checking the installed version</figcaption></figure></p>
<p>Next, install Virtualenv.</p>
<pre class="">:~$ sudo apt install virtualenv python3-virtualenv</pre>
<p><figure id="attachment_7975" aria-describedby="caption-attachment-7975" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-7975 size-full" src="https://www.osradar.com/wp-content/uploads/2018/12/3-111.png" alt="3.- Installling virtualenv" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/3-111.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/3-111-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/3-111-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/3-111-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/3-111-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/3-111-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7975" class="wp-caption-text">3.- Installing virtualenv</figcaption></figure></p>
<p>So, the next step is to create a new environment with Python3 by default called <code>example</code>.</p>
<pre class="">:~$ virtualenv --python=python3 example</pre>
<p><figure id="attachment_7976" aria-describedby="caption-attachment-7976" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7976" src="https://www.osradar.com/wp-content/uploads/2018/12/4-3.png" alt="4.- Creating a new virtual environment" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/4-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/4-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/4-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/4-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/4-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/4-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7976" class="wp-caption-text">4.- Creating a new virtual environment</figcaption></figure></p>
<p>Then, activate the new virtual environment.</p>
<pre class="">:~$ cd example
:~$ source bin/activate</pre>
<p>Next, install Django.</p>
<pre class="">:~$ pip install django==2.1.4</pre>
<p><figure id="attachment_7978" aria-describedby="caption-attachment-7978" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7978" src="https://www.osradar.com/wp-content/uploads/2018/12/5-3.png" alt="5.- Install Django" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/5-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/5-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/5-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/5-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/5-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/5-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7978" class="wp-caption-text">5.- Install Django</figcaption></figure></p>
<p><em>Note: At the time of writing this post, the latest stable version of Django is 2.1.4</em></p>
<p>So, check the installation.</p>
<pre class="">:~$ django-admin --version</pre>
<p><figure id="attachment_7979" aria-describedby="caption-attachment-7979" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7979" src="https://www.osradar.com/wp-content/uploads/2018/12/6-3.png" alt="6.- Check the installation" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/6-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/6-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/6-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/6-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/6-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/6-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7979" class="wp-caption-text">6.- Check the installation</figcaption></figure></p>
<p>So, let&#8217;s create a Django project.</p>
<h1>Create a new project</h1>
<p>A recommended way to do projects with Django is to create a new virtual environment for each one.</p>
<p>In this case, I will continue with the one I just created. All that remains is to create the project itself.</p>
<pre class="">:~$ django-admin startproject newproject</pre>
<p><figure id="attachment_7980" aria-describedby="caption-attachment-7980" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7980" src="https://www.osradar.com/wp-content/uploads/2018/12/7-3.png" alt="7.- Creating a new project" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/7-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/7-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/7-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/7-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/7-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/7-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7980" class="wp-caption-text">7.- Creating a new project</figcaption></figure></p>
<p>Explore the project folder.</p>
<pre class="">:~$ cd newproject
:~$ tree</pre>
<p><figure id="attachment_7981" aria-describedby="caption-attachment-7981" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7981" src="https://www.osradar.com/wp-content/uploads/2018/12/8-3.png" alt="8.- Exploring the project folder" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/8-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/8-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/8-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/8-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/8-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/8-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7981" class="wp-caption-text">8.- Exploring the project folder</figcaption></figure></p>
<p>Edit <code>settings.py</code> file. In the <em>Allowed hosts</em> section add your IP.</p>
<pre class="">:~$ nano newproject/settings.py</pre>
<p><figure id="attachment_7983" aria-describedby="caption-attachment-7983" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-7983 size-full" src="https://www.osradar.com/wp-content/uploads/2018/12/9-111.png" alt="9.- Setting the allowed hosts" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/9-111.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/9-111-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/9-111-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/9-111-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/9-111-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/9-111-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7983" class="wp-caption-text">9.- Setting the allowed hosts</figcaption></figure></p>
<p>Now it&#8217;s time to raise the project with Django runserver.</p>
<pre class="">:~$ python manage.py runserver 192.168.1.36:8000</pre>
<p><figure id="attachment_7984" aria-describedby="caption-attachment-7984" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7984" src="https://www.osradar.com/wp-content/uploads/2018/12/10-2.png" alt="10.- Starting the project" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/10-2.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/10-2-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/10-2-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/10-2-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/10-2-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/10-2-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7984" class="wp-caption-text">10.- Starting the project</figcaption></figure></p>
<p>Open your web browser and go to <code>http://your_IP:8000</code>. You will see the Django default page. In short, Django is correctly installed.</p>
<p><figure id="attachment_7985" aria-describedby="caption-attachment-7985" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7985" src="https://www.osradar.com/wp-content/uploads/2018/12/11-2.png" alt="11.- Django correctly installed" width="1366" height="671" srcset="https://www.osradar.com/wp-content/uploads/2018/12/11-2.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/11-2-855x420.png 855w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7985" class="wp-caption-text">11.- Django correctly installed</figcaption></figure></p>
<p>If you want to stop the project, press CTRL + c.</p>
<p>Just create the administrator account for Django. To do this, type the following.</p>
<pre class="">:~$ python manage.py migrate</pre>
<p><figure id="attachment_7986" aria-describedby="caption-attachment-7986" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7986" src="https://www.osradar.com/wp-content/uploads/2018/12/12-2.png" alt="12.- Running the Django migrations" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/12-2.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/12-2-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/12-2-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/12-2-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/12-2-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/12-2-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7986" class="wp-caption-text">12.- Running the Django migrations</figcaption></figure></p>
<p>Django will automatically create the database for the administrator account, however, it is necessary to execute and do the migrations.</p>
<p>Now create the admin account. You will have to set a username and password.</p>
<pre class="">:~$ python manage.py createsuperuser</pre>
<p><figure id="attachment_7987" aria-describedby="caption-attachment-7987" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7987" src="https://www.osradar.com/wp-content/uploads/2018/12/13-2.png" alt="13.- creating the admin account" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/13-2.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/13-2-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/13-2-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/13-2-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/13-2-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/13-2-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7987" class="wp-caption-text">13.- creating the admin account</figcaption></figure></p>
<p>Run Django runserver again and access the administration panel.</p>
<pre class="">:~$ python manage.py runserver 192.168.1.36:8000</pre>
<p>Now, open your web browser and go to <code>http://your_ip:8000/admin</code>. And you will see this:</p>
<p><figure id="attachment_7988" aria-describedby="caption-attachment-7988" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7988" src="https://www.osradar.com/wp-content/uploads/2018/12/14-2.png" alt="14.- Django administration" width="1366" height="671" srcset="https://www.osradar.com/wp-content/uploads/2018/12/14-2.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/14-2-855x420.png 855w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7988" class="wp-caption-text">14.- Django administration</figcaption></figure></p>
<p>Type your credentials. Next, click on Log in.</p>
<p><figure id="attachment_7989" aria-describedby="caption-attachment-7989" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7989" src="https://www.osradar.com/wp-content/uploads/2018/12/15-1.png" alt="15.- Django administration panel" width="1366" height="671" srcset="https://www.osradar.com/wp-content/uploads/2018/12/15-1.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/15-1-855x420.png 855w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7989" class="wp-caption-text">15.- Django administration panel</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h1>Conclusion</h1>
<p>Django is a framework written in python that is very popular and powerful. There are many popular sites that use it because of its tolerance to high levels of traffic. In addition, it stands out for its security policies.</p>
<p>Please share this post.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-django-ubuntu-18-04/">How to install Django on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-django-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Django Framework on CentOS 7?</title>
		<link>https://www.osradar.com/how-to-install-django-framework-on-centos-7/</link>
					<comments>https://www.osradar.com/how-to-install-django-framework-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Wed, 13 Jun 2018 07:36:42 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=3995</guid>

					<description><![CDATA[<p>In a world where the premise is that time is money, you need tools that allow you to develop applications or faster. The Frameworks exist to save you from having to reinvent the wheel and help you ease the burden when you build a site. Django is an open source web development framework, written in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-django-framework-on-centos-7/">How to install Django Framework on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In a world where the premise is that time is money, you need tools that allow you to develop applications or faster. The Frameworks exist to save you from having to reinvent the wheel and help you ease the burden when you build a site.</p>
<p><a href="https://www.djangoproject.com/"><strong>Django</strong></a> is an open source web development framework, written in Python, that respects the design pattern known as Model-view-template. Developed by experienced programmers, Django handles much of the complexity of web development, so you can concentrate on writing your application <strong>without reinventing the wheel</strong>.</p>
<p>Django is now a thriving open source collaborative project, with thousands of users and contributors. While it still has some features that reflect its origin, Django has evolved into a versatile framework that is capable of developing any type of website.</p>
<h2>Django: a versatile framework</h2>
<p>Apart from the main features that should be used in almost all web applications: URL mapping, views, templates and templates, Django also provides:</p>
<ul>
<li><strong>Forms</strong>: Django simplifies the creation, validation and processing of forms.</li>
<li><strong>User authentication and permissions</strong>: Django includes a robust authentication and permissions system</li>
<li><strong>Data Serialization</strong>: Django makes it easy to serialize and serve your data as XML or JSON.</li>
<li><strong>An extensible template system</strong> based on labels, with template inheritance.</li>
<li><strong>Internationalization support</strong>, including built-in translations of the administration interface.</li>
</ul>
<p>And of course many more things.</p>
<h2>Let&#8217;s go for it. Installing Apache web server</h2>
<p>We will see how to install Django in CentOS, and we have several ways to do it, we will use pip for it because it guarantees us flexibility and having the latest stable version of the framework.</p>
<p>For this tutorial we must have root access. To have it we must write:</p>
<p><strong>          sudo -i</strong></p>
<p><figure id="attachment_3996" aria-describedby="caption-attachment-3996" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-3996" src="https://www.osradar.com/wp-content/uploads/2018/06/1-7.png" alt="1.- Root Access" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/1-7.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/1-7-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-3996" class="wp-caption-text">1.- Root Access</figcaption></figure></p>
<p>Obviously if we are going to install Django, it is because we must have a web server running, together with the database manager.</p>
<p>Installing the apache web server can be done with the command:</p>
<p><strong>           yum install httpd</strong></p>
<p><figure id="attachment_3997" aria-describedby="caption-attachment-3997" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-3997" src="https://www.osradar.com/wp-content/uploads/2018/06/2-9.png" alt="2.- Installing httpd" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/2-9.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/2-9-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-3997" class="wp-caption-text">2.- Installing httpd</figcaption></figure></p>
<p>Once installed, we must initialize the service and enable it so that when starting the system, it also initializes:</p>
<p><strong>          systemctl start httpd.service</strong></p>
<p><strong>          systemctl enabled httpd.service</strong></p>
<p><figure id="attachment_4000" aria-describedby="caption-attachment-4000" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4000" src="https://www.osradar.com/wp-content/uploads/2018/06/4-8.png" alt="4.- Starting httpd" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/4-8.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/4-8-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4000" class="wp-caption-text">4.- Starting httpd</figcaption></figure></p>
<p>It is a good idea to go to your web browser and verify that the web server is running correctly:</p>
<p><strong>            http://ip_server</strong></p>
<p><figure id="attachment_3999" aria-describedby="caption-attachment-3999" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-3999" src="https://www.osradar.com/wp-content/uploads/2018/06/3-9.png" alt="3.- Checking web server" width="1366" height="633" srcset="https://www.osradar.com/wp-content/uploads/2018/06/3-9.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-300x139.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-768x356.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-1024x475.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-696x323.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-1068x495.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/3-9-906x420.png 906w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-3999" class="wp-caption-text">3.- Checking web server</figcaption></figure></p>
<p>If we see the image above, it means that the web server is running and there are no problems so far, that is, we can continue.</p>
<h2>Installing MariaDB</h2>
<p>MariaDB is one of the most reliable and secure open source database managers available. It stands out for its robustness, ease of use and extensive existing documentation. We must install it:</p>
<p><strong>          yum install mariadb mariadb-server</strong></p>
<p><figure id="attachment_4001" aria-describedby="caption-attachment-4001" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4001" src="https://www.osradar.com/wp-content/uploads/2018/06/5-9.png" alt="5.- Installing mariadb" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/5-9.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/5-9-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4001" class="wp-caption-text">5.- Installing mariadb</figcaption></figure></p>
<p>And then, we must start the service and enable it to run at system startup.</p>
<p><strong>           systemctl start mariadb.service</strong></p>
<p><strong>           systemctl enable mariadb.service</strong></p>
<p><figure id="attachment_4002" aria-describedby="caption-attachment-4002" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4002" src="https://www.osradar.com/wp-content/uploads/2018/06/6-8.png" alt="6.- Starting mariadb" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/6-8.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/6-8-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4002" class="wp-caption-text">6.- Starting mariadb</figcaption></figure></p>
<p>Then we&#8217;ll invoke the mysql script to quickly configure mariadb. We&#8217;ll answer the questions like this: Y,Y,N,Y,Y.</p>
<p><strong>             mysql_secure_installation</strong></p>
<p><figure id="attachment_4003" aria-describedby="caption-attachment-4003" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4003" src="https://www.osradar.com/wp-content/uploads/2018/06/7-7.png" alt="7.- Configuring mariadb" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/7-7.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/7-7-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4003" class="wp-caption-text">7.- Configuring mariadb</figcaption></figure></p>
<p>And now we log in to mariadb to execute a statement and test the installation we just did.</p>
<p><strong>            mysql -u root -p</strong></p>
<p>After entering the root password, we will be in the mariadb console. We&#8217;ll write on it:</p>
<p><strong>           SHOW DATABASES;</strong></p>
<p><figure id="attachment_4006" aria-describedby="caption-attachment-4006" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4006" src="https://www.osradar.com/wp-content/uploads/2018/06/8-7.png" alt="8.- Showing databases" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/8-7.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/8-7-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4006" class="wp-caption-text">8.- Showing databases</figcaption></figure></p>
<p>By showing us the created databases we confirm the success of the process.</p>
<h2>It&#8217;s Django&#8217;s turn</h2>
<p>CentOS does not provide, by default, some packages we need, so we will add the EPEL repository. EPEL is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for CentOS, Red Hat Linux and others:</p>
<p><strong>           wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</strong></p>
<p>And then:</p>
<p><strong>          rpm -ivh epel-release-latest-7.noarch.rpm</strong></p>
<p><figure id="attachment_4007" aria-describedby="caption-attachment-4007" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4007" src="https://www.osradar.com/wp-content/uploads/2018/06/9-5.png" alt="9.- Adding EPEL repository" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/9-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/9-5-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4007" class="wp-caption-text">9.- Adding EPEL repository</figcaption></figure></p>
<p>We check if the repository was added correctly:</p>
<p><strong>           yum repolist</strong></p>
<p><figure id="attachment_4008" aria-describedby="caption-attachment-4008" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4008" src="https://www.osradar.com/wp-content/uploads/2018/06/10-5.png" alt="10.- Showing repositories list" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/10-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/10-5-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4008" class="wp-caption-text">10.- Showing repositories list</figcaption></figure></p>
<p>As we see in the image, the EPEL repository was added and is part of the system&#8217;s software sources.</p>
<p>Now we proceed to install python-pip that will allow us to install Django.</p>
<p><strong>           yum install python-pip</strong></p>
<p><figure id="attachment_4009" aria-describedby="caption-attachment-4009" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4009" src="https://www.osradar.com/wp-content/uploads/2018/06/11-5.png" alt="11.- Installing python-pip" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/11-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/11-5-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4009" class="wp-caption-text">11.- Installing python-pip</figcaption></figure></p>
<p>Now we can install Django with the command:</p>
<p><strong>            pip install django</strong></p>
<p>That command will install pip, but we need to update it to be compatible with the updated version of Django. That&#8217;s why we&#8217;re writing:</p>
<p><strong>            python -m pip install &#8211;upgrade pip setuptools</strong></p>
<p><figure id="attachment_4010" aria-describedby="caption-attachment-4010" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4010" src="https://www.osradar.com/wp-content/uploads/2018/06/88.png" alt="Upgrading PIP" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/88.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/88-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/88-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/88-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/88-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/88-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/88-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4010" class="wp-caption-text">12.- Upgrading PIP</figcaption></figure></p>
<p>And now, yes, we proceed to install it:</p>
<p><strong>          python -m pip install django</strong></p>
<p><figure id="attachment_4011" aria-describedby="caption-attachment-4011" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4011" src="https://www.osradar.com/wp-content/uploads/2018/06/999.png" alt="13.- Installing Django" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/999.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/999-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/999-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/999-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/999-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/999-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/999-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4011" class="wp-caption-text">13.- Installing Django</figcaption></figure></p>
<p>We check which version is installed:</p>
<p><strong>          django-admin &#8211;version</strong></p>
<p><figure id="attachment_4012" aria-describedby="caption-attachment-4012" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4012" src="https://www.osradar.com/wp-content/uploads/2018/06/12-4.png" alt="12.- Cheking the version installed" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/12-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/12-4-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4012" class="wp-caption-text">12.- Cheking the version installed</figcaption></figure></p>
<p>The installed version is LTS which guarantees stability and security updates for a long time.</p>
<h2>Creating a simple project in Django</h2>
<p>To create a simple Django project we can do it with the following command:</p>
<p><strong>           django-admin startproject test1</strong></p>
<p><figure id="attachment_4013" aria-describedby="caption-attachment-4013" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4013" src="https://www.osradar.com/wp-content/uploads/2018/06/15-3.png" alt="Crating a project" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/15-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/15-3-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4013" class="wp-caption-text">13.-Creating a project</figcaption></figure></p>
<p>And now we access the folder:</p>
<p><strong>          cd test1</strong></p>
<p><figure id="attachment_4014" aria-describedby="caption-attachment-4014" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4014" src="https://www.osradar.com/wp-content/uploads/2018/06/16-3.png" alt="Accessing to project folder" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/16-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/16-3-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4014" class="wp-caption-text">14.- Accessing to project folder</figcaption></figure></p>
<p>Then we start the database configuration instructions with the following command:</p>
<p><strong>           python manage.py migrate</strong></p>
<p><figure id="attachment_4015" aria-describedby="caption-attachment-4015" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4015" src="https://www.osradar.com/wp-content/uploads/2018/06/17-2.png" alt="15.- Executing migrations" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/17-2.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/17-2-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4015" class="wp-caption-text">15.- Executing migrations</figcaption></figure></p>
<p>The next step is to create an administrative user to manage the project:</p>
<p><strong>          python manage.py createsuperuser</strong></p>
<p>You will ask us for information such as username, email and password (it should not be too short):</p>
<p><figure id="attachment_4016" aria-describedby="caption-attachment-4016" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4016" src="https://www.osradar.com/wp-content/uploads/2018/06/18-2.png" alt="16.- Creating root user" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/18-2.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/18-2-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4016" class="wp-caption-text">16.- Creating root user</figcaption></figure></p>
<p>Now we must modify the options file to define the hosts allowed to manage the project.</p>
<p><strong>          cd test1</strong></p>
<p><strong>          nano manage.py</strong></p>
<p>And in it we must modify the host by the ip address of our computer. Once modified, press crt + x and say yes</p>
<p><figure id="attachment_4018" aria-describedby="caption-attachment-4018" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4018" src="https://www.osradar.com/wp-content/uploads/2018/06/20-3.png" alt="18.- Modifying settings" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/20-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/20-3-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4018" class="wp-caption-text">17.- Modifying settings</figcaption></figure></p>
<p><figure id="attachment_4020" aria-describedby="caption-attachment-4020" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4020" src="https://www.osradar.com/wp-content/uploads/2018/06/19-3.png" alt="17.- Modifing settings" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/19-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/19-3-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4020" class="wp-caption-text">18.- Modifing settings</figcaption></figure></p>
<p>Now head back to the parent directory with the command below:</p>
<p><strong>           cd ../</strong></p>
<p>And we run the framework as such. Don&#8217;t forget to replace the ip I put in with yours.:</p>
<p><strong>         python manage.py runserver 192.168.250.4:8000</strong></p>
<p><figure id="attachment_4021" aria-describedby="caption-attachment-4021" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4021" src="https://www.osradar.com/wp-content/uploads/2018/06/22-2.png" alt="20 .- Running the server" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/22-2.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/22-2-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4021" class="wp-caption-text">19 .- Running the server</figcaption></figure></p>
<p>Now with the server running, we proceed to go to our web browser and place the ip of the web server and the port selected for Django.</p>
<p><figure id="attachment_4022" aria-describedby="caption-attachment-4022" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4022" src="https://www.osradar.com/wp-content/uploads/2018/06/21-3.png" alt="20.-Running the project" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/21-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/21-3-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4022" class="wp-caption-text">20.-Running the project</figcaption></figure></p>
<h2>Unlocking the port on CentOS</h2>
<p>It is possible that even if you do these steps, you may still get an error when accessing from your browser. The port probably needs to be opened in the CentOS firewall.</p>
<p>To do this, we must enter the following commands:</p>
<p><strong>           firewall-cmd &#8211;zone=public &#8211;add-port=8000/tcp &#8211;permanent</strong></p>
<p><strong>           firewall-cmd &#8211;reload</strong></p>
<p>Django is a powerful framework for web technologies, flexible, free and with a large community behind its development, intended for perfectionist web developers.</p>
<p>Its installation is not complex but it requires several steps for its operation. All that&#8217;s left now is to start coding.</p>
<p>Please share this article through your social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-django-framework-on-centos-7/">How to install Django Framework on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-django-framework-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
