These are chat archives for django/django

12th
Sep 2017
Chase
@Belax8
Sep 12 2017 03:05 UTC
Thanks @thejoeejoee . That's perfect!!!
Hi, I am trying to do a slider template rendering ok. But not sliding or showing other images in slider. Only first image is rendering. Anyone can help me with this please

'<section id="slider" class="fullheight nomargin"
{% for carousel_item in carousel_items.all %}
{% if carousel_item.image %}

data-background-delay="3500"
data-background-fade="1000"
{% if carousel_item.embed_url %}
{% else %}
{% image carousel_item.image width-1000 as carouselimagedata %}
data-background="{{ carouselimagedata.url }}"style="width: 100%; min-height: {{ carouselimagedata.height }}px;" alt="{{ carouselimagedata.alt }}"{% if not forloop.last %},{% endif %}
{% endif %}
{% endif %}
>

            <canvas id="canvas-particle" class="opacity-8" data-rgb="13,144,179"><!-- CANVAS PARTICLES --></canvas>    
            <!-- Backstretch Navigation -->
            {% if carousel_items|length > 1 %}
            <a class="bs-next" href="#"></a>
            <a class="bs-prev" href="#"></a>
            {% endif %}
            <div class="display-table">
                <div class="display-table-cell vertical-align-middle">

                    <div class="container text-center">

                        <div class="rounded-logo wow fadeIn" data-wow-delay="0.4s">
                            <img src="{% static 'images/logo.png' %}" alt="">
                        </div>
                        {% if carousel_item.caption %}
                        <h1 class="weight-300 margin-top-30 margin-bottom-0 wow fadeIn" data-wow-delay="0.6s">{{ carousel_item.caption }}</h1>
                        {% endif %}
                    </div>

                </div>
            </div>




            <span class="raster overlay dark-3 z-index-0"><!-- dark|light overlay [0 to 9 opacity] --></span>


            {% endfor %}  
        </section>'
here code
Josef Kolář
@thejoeejoee
Sep 12 2017 13:51 UTC
@Qurus what is carousel_items? some Manager instance?
Hi, @thejoeejoee in my model 'class CarouselItem(LinkFields):
image = models.ForeignKey(
'wagtailimages.Image',
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name='+'
)
embed_url = models.URLField("Embed URL", blank=True)
caption = models.CharField(max_length=255, blank=True)
panels = [
    ImageChooserPanel('image'),
    FieldPanel('caption'),
]

api_fields = ['image', 'caption'] + LinkFields.api_fields

class Meta:
    abstract = True'
i got this from wagtaildemo app
Josef Kolář
@thejoeejoee
Sep 12 2017 13:55 UTC
@Qurus show me the code of creating context for this template
Joseph Safwat Khella
@JosephSKh
Sep 12 2017 21:09 UTC
hi guys ,,, iusing djoser for login/logout but I just can't see the links, any ideas?
thx
Emmanuel Obogbaimhe
@EmmanuelObo
Sep 12 2017 23:13 UTC
Hey guys. Anybody who uses or used Django tastypie. Did you have trouble migrating other models after installing it?
Rod
@sixtycycles
Sep 12 2017 23:19 UTC
Hey quick one (i hope) where in a projects files can i find the Database connection Info? is it in settings? (we’re not using SQLlite)