title: Django Models between apps
body: <p>Do I need is to import a model from app tienda and show the data in my home.html page</p>
  <p>My Project name is Proyectoweb
  My project apps are Proyectowebapp, Tienda
  I have nothing in Proyectowebapp.models.py</p>
  <p>In tienda models.py I wrote:</p>
  <pre><code>from django.db import models
      class CategoriaProd(models.Model):
         nombre=models.CharField(max_length=50)
         imagen = models.ImageField(upload_to=&quot;catimgs&quot;, null=True, blank=True)
         created=models.DateTimeField(auto_now_add=True)
         updated=models.DateTimeField(auto_now_add=True)
  
      class Meta:
         verbose_name=&quot;categoriaProd&quot;
         verbose_name_plural=&quot;categoriasProd&quot;
  
         def __str__(self):
           return self.nombre
  
      class Producto(models.Model):
         nombre = models.CharField(max_length=50)
         categorias = models.ForeignKey(CategoriaProd, on_delete=models.CASCADE)
         imagen = models.ImageField(upload_to=&quot;tienda&quot;, null=True, blank=True)
         precio = models.FloatField()
         created=models.DateTimeField(auto_now_add=True)
         updated=models.DateTimeField(auto_now_add=True)
  
      class Meta:
         verbose_name=&quot;Producto&quot;
         verbose_name_plural=&quot;Productos&quot;
  
         def __str__(self):
             return self.nombre
  </code></pre>
  <p>In Proyectowebapps views.py i wrote:</p>
  <pre><code>    from django.shortcuts import render
      from tienda.models import CategoriaProd 
  
      def home(request):
         return render(request, &quot;Proyectowebapp/home.html&quot;)
  
      def tienda(request):
         prodcats=CategoriaProd.objects.all()
         return render(request, &quot;Proyectowebapp/home.html&quot;, {&quot;prcat&quot;:prodcats})
  </code></pre>
  <p>In my home.html I wrote:</p>
  <pre><code>    {% for categoriaProd in prcat %}
         &lt;img src=&quot;{{categoriaProd.imagen.url}}&quot;&gt;
         &lt;h7&gt;{{categoriaProd.nombre}}&lt;/h7&gt;
      {% endfor %}
  </code></pre>
  <p>Thanks, Sorry but Im new in Django world</p>