Essex
Essex

Reputation: 6128

Issue with Django Template Background

I'm getting an issue with my background template picture. Each time I'm loading Django template, my background is black in the first time, then becomes good with my picture after 0.5/1 second.

I wrote in my script (Common HTML Template) :

{% load staticfiles %}
{% load static %}
{% load user_tags %}
{% load variables %}

<style>
    body {
        background-image:url("{% get_static_prefix %}{{ mytheme }}/images/bg.jpg");
        }
</style>

The url path is good because my picture is loaded, but I have this black background before during ~ 1s

I didn't write background picture in my CSS file, but only in my common template (navbar template which is called each time).

Do you have any idea ?

Upvotes: 0

Views: 123

Answers (1)

aman kumar
aman kumar

Reputation: 3156

It is due to high image quality, you can add the one loader till the all web content so that black screen will not be displayed. There is nothing problem with Django template in this.

http://smallenvelop.com/display-loading-icon-page-loads-completely/

Upvotes: 2

Related Questions