macks posteets tagged relations  [ Profile ]

Sort by: Date / Title /

  1. 4 years ago
    1. #obtener la media de tipo image que pertenezca a una noticia  (newsmodel es la tabla intermedia)
    2. image =MediaModel.objects.filter(newsmodel__id=id, type='image')
    3.  
    4. #obtener un campo especifico de una relacion
    5. news = get_object_or_404(NewsModel, id=id)
    6. media = news.media.all()
    7. filename =media.get().filename
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1932"></script>

First / Previous / Next / Last / Page 1 of 1 (1 posteets)