If you are following this website you can see we share most of the contents related to Django Framework and Python. Today here we are with another useful tutorial for making an easy website with Python. Without writing a single line of code you can make amazing websites. DjangoCMS is just like WordPress but it is built with Python Programming and specifically with Django Framework.
How to Make Website WIth DjangoCSM?
It’s quite easy. First we will install the DjangoCMS package in your local machine and than launch the website like we run a Django Web App. Before that it will be useful to create a Virtual Environment.
Install Virtual Environment
With Virtual Environment you an easily install all the necessary packages and also transfer your project such. Follow this guide to install virtual Environment:
After the Installation of Virtual Environment, create one i.e. activate a Virtualenv in your local directory. Than we will run the installation of necessary package i.e. djangoCMS framework
Install DjangoCMS Installer
Next we will install the installer called djangocms-installer. The installer will automatically create a website for us. In your virtual environment type the following command:
(env) $ pip install djangocms-installer
(env) $ djangocms mysite
For this demo, I have named my website as mysite, you are free to choose any name you want to. The installer generally takes some time for installation. But it gets the job done within a minute.
After the installation is done it creates a directory with your project name i.e. mysite. Change your directory to mysite and then try running the following code:
python manage.py runserver
This is the similar way of running your server in Django Framework. Since DjangoCMS is built with Django Framework many commands and approaches in web app development are similar.
Username and Password
Running the server in localhost environment you might have noticed that it asks for username and password. One thing here we need to understand is that, if we ran the localhost server without creating a superuser than we don’t have any username and password.
So we should first create a superuser and than run the server. After creating the superuser we can create other users from Admin Panel if we want to.
Make a superuser with this quick guide and run your server. After that finally you will see your CMS up and running like shown below:
From now onward, all we have to do is play with the UI and make the website.