Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplaying Values Django Python
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/wLlPu.png" alt="enter image description here"> I am programming in Django 1.4.3 with Python 2.7 on Windows Vista. I am trying to input features for the user such as telephone in <code>localhost:8000/admin</code> and then display then on the front web page. I have <code>index.html</code> for the front page:</p> <pre><code>&lt;!-- Shows the label on tab. --&gt; {% block title %} Inicio - Bienvenidos {% endblock %} {% block content %} &lt;p&gt; Esta es mi primera pagina en Django &lt;/p&gt; {% if user.is_authenticated %} &lt;p&gt; Bienvenido {{user.username}} &lt;/p&gt; {% if user.get_profile.photo %} &lt;img src="/media/{{user.get_profile.photo}}" width="100px" height="100px"/&gt; {% endif %} {% if user.get_profile.telefono %} &lt;p&gt; Numero Tel:&lt;/p&gt; {{user.get_profile.telefono}}&lt;/p&gt; {% endif %} {% endif %} {% endblock %} </code></pre> <p>And it is pulling input values defined in <code>models.py</code>:</p> <pre><code>from django.db import models from django.contrib.auth.models import User # Create your models here. class userProfile(models.Model): def url(self, filename): ruta = "MultimediaData/Users/%s/%s"%(self.user.username, filename) return ruta user = models.OneToOneField(User) photo = models.ImageField(upload_to = url) telefono = models.CharField(max_length = 30) def __unicode__(self): return self.user.username </code></pre> <p>However, after I input the <code>telefono</code> (telephone) value, the front page does not display it. I have attached the front page I am getting. The number should appear under the fish fillets image. What seems to be the problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload