First app in Django

After the configuration of Django, there is basic poll application that is explained in the official Documentation. Activate the project and run it!

In a separate window start the poll app:

Then, write vim to start :NERDTree. Type the message into the

Create a polls/ file with ‘m’ and ‘a’ inside NERDTree

To link them with the main site, by typing the code in in your side

To check your changes in the local server, see your browser

Now we are going to create a question and choice classes into

Let’s add polls apps into the  mysite/

After this change, it is important to do the migration

In order to have data into the polls, lets migrate tables from sql

To refresh the changes, let’s migrate again to refresh the database

Now, we will code with the python shell to show the objects we created

To import the library of datetime and make compatible python 2 and 3:

Save these changes and start a new Python interactive shell by running python shell again. This time we are going to check q1 and q2:

In this case we have a problem with q2 since it was not declared as q1 was

About Julita Inca

Ingeniero de Sistemas UNAC, Magíster en Ciencias de la Computación PUCP, Magíster en Computación de Alto Rendimiento de la Universidad de Edimburgo, OPW GNOME 2011, Miembro de la GNOME Foundation desde el 2012, Embajadora Fedora Perú desde el 2012, ganadora del scholarship of the Linux Foundation 2012, experiencia como Admin Linux en GMD y Especialista IT en IBM, con certificaciones RHCE, RHCSA, AIX 6.1, AIX 7 Administrator e ITILv3. Experiencia académica en universidades como PUCP, USIL y UNI. Leader of LinuXatUNI Community, HPC Software Specialist at UKAEA, and reviewer of the Technological Magazine of ESPOL-RTE, and volunteering Linux training for MINSA Peru... a simple mortal, just like you!
This entry was posted in τεχνολογια :: Technology and tagged , , , , , . Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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