First steps on Django

1. Installing Miniconda

1.1.- Downloading Miniconda

Go to the Official Website of Miniconda and download the version to Linux:

1.2.- Running miniconda

Now we understand that if it is a script, it has the executing permission. In this case, it is shown that it does not have it, and we use the chmod command to set the execution. Then, run it with the -b flag to do it without human intervention (or silent mode), and the -p option redirect the prefix from the default route ~/ to /opt as it is shown:

1.3.-Check previously the owner and group to set the right permissions

1.4.- Link the useful events of Python in order to avoid conflicts between the functions of Python of anaconda and from the system.

1.5.- Create the environment where are you going to work in Python 3

1.6.- Activate the environment with source and install the django with the python index package

2.- Creating my first site

2.1.- Following the Django tutorial check the version of the Django framework, then create the site. This time it is called yulytas_site.

2.2.- Check the site directory, in this case it is done with nerdtree and pathogen. (btw I’ve moved the environment from my home to Development)

2.3.- Run the server from your site

2.4.- As the message suggested, we will turn off the server by typing CTRL+C and start the migration (because in red it is said that we have 13 unapplied).

2.5.- Now we see the local website with the port 8000 in our browser

3. Creating a superuser

3.1.- Every app need an admin, so lets create a superuser called admin. To do this, we are going to open another terminal (CTRL+SHIFT+T) in order to keep the runserver terminal and stay aware of the events. In this new terminal windows we must run again the server as it is follow:

3.2.- Now let’s see the admin user in the Web, inserting the proper passwd

At first we are going to see the basic modules as admin that manage user and group, we are going to see later other modules to abstract objects

Parallel notes

1.- To list all the environments to activate the desirable env

env.png

2.- To delete the database sqlite with $ rm -r db.sqlite3 and the whole migrations previously done

deletebd

About Julita Inca

System Engineering degree at UNAC, Computer Science Masters at PUCP, High Performance Masters at University of Edinburgh, Winner OPW GNOME 2011, GNOME Foundation member since 2012, Fedora Ambassador since 2012, winner of the Linux Foundation scholarship 2012, Linux Admin at GMD 2012, IT Specialist at IBM 2013. Academia experience in lecturing at PUCP, USIL and UNI Peru (2010-2018). HPC intern at ORNL 2018. HPC Software Specialist at UKAEA since 2020. Tech Certifications: RHCE, RHCSA, AIX 6.1, AIX 7 Administrator, and ITILv3. Leader of LinuXatUNI Community, Creator of the "Mujeres Imperfectas | I'm perfect woman" channel, Reviewer of the Technological Magazine of ESPOL-RTE, Online trainer at BackTrackAcademy, blogger, photographer, IT-Linux-HPC-science worldwide speaker, graphic designer, researcher, content creator, press communicator... a simple mortal, just like you!
This entry was posted in τεχνολογια :: Technology and tagged , , , , , , , , , , . Bookmark the permalink.

2 Responses to First steps on Django

  1. Awesome tutorial! Is this useful for production environments or development only?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s