[mezzanine-users] Carousel for all the pages

2014-03-15 Thread laperl
Hello,

I'm trying to put a carousel in my webpage for all the entries. I did the 
models.py that comes from Page:

class HomePage(Page, RichText):
cap = models.CharField(max_length=200)
class Meta:
verbose_name = _(Home page)
verbose_name_plural = _(Home pages)

class SlidePortada(Orderable):
homepage = models.ForeignKey(HomePage, related_name=slides)
image = FileField(verbose_name=_(Image),
upload_to=upload_to(theme.Slide.image, slider),
format=Image, max_length=255, null=True, blank=True)


and admin.py:

from django.contrib import admin
from mezzanine.pages.admin import PageAdmin
from .models import HomePage, SlidePortada

class SlidePortadaAdmin(admin.TabularInline):
model = SlidePortada

class HomePageAdmin(PageAdmin):
inlines = (SlidePortadaAdmin,)

admin.site.register(HomePage, HomePageAdmin)


And I create a template carousel.html that base.html includes that look 
like this:

{% load mezzanine_tags staticfiles %}

div id=carousel-tenda class=carousel slide carousel-fade 
data-ride=carousel
  div class=carousel-inner
{% with page.homepage.slides.all as imatges %}
{% for imatge in imatges %}
div class=item {% if forloop.first %} active {% endif %}
  img src={{ MEDIA_URL }}{% thumbnail imatge.image 400 400 
%} alt=Hi! /
/div
{% endfor %}
{% endwith %}

  /div
/div

The problem is that when I click to a Blog or Contact menu or other than 
homepage than I created, the slider doesn't show the photos. Which is the 
mistake?

Thank you very much

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Mezzanine at PyCon Asia-Pacific 2014

2014-03-15 Thread Stephen McDonald
Hi all,

I'll be giving a talk on Mezzanine at PyCon Asia-Pacific in May:

https://tw.pycon.org/2014apac/en/

Hope to see you there!

The PyCon APAC site is powered by Mezzanine too, which is really cool.


-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.